mirror of
https://github.com/sprockets/sprockets-status.git
synced 2024-11-24 03:00:19 +00:00
Add some logging around pkg_resources failures.
This commit is contained in:
parent
3a57fede12
commit
c37493b318
1 changed files with 8 additions and 0 deletions
|
@ -1,9 +1,13 @@
|
|||
import json
|
||||
import logging
|
||||
import pkg_resources
|
||||
|
||||
from tornado import web
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class StatusHandler(web.RequestHandler):
|
||||
"""
|
||||
Simple handler that returns application status information.
|
||||
|
@ -60,7 +64,11 @@ class StatusHandler(web.RequestHandler):
|
|||
cls._application_name = pkg_info.project_name
|
||||
cls._application_version = pkg_info.version
|
||||
cls._package_name = None
|
||||
_LOGGER.debug('found application information "%s" %s',
|
||||
cls._application_name, cls._application_version)
|
||||
except pkg_resources.ResolutionError:
|
||||
_LOGGER.exception('failed to lookup package "%r"',
|
||||
cls._package_name)
|
||||
cls._application_name = None
|
||||
cls._application_version = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue