Skip to content

Commit

Permalink
Merge pull request #33904 from rallytime/bp-33806
Browse files Browse the repository at this point in the history
Back-port #33806 to 2015.5
  • Loading branch information
Mike Place committed Jun 10, 2016
2 parents cdda593 + 638ccf5 commit cb88960
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion salt/netapi/rest_cherrypy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@

# Import third-party libs
import cherrypy
from cherrypy.lib import cpstats
import yaml

# Import Salt libs
Expand Down Expand Up @@ -2164,6 +2163,13 @@ def GET(self):
:status 406: |406|
'''
if hasattr(logging, 'statistics'):
# Late import
try:
from cherrypy.lib import cpstats
except ImportError:
logger.error('Import of cherrypy.cpstats failed. Possible '
'upstream bug here: https://github.com/cherrypy/cherrypy/issues/1444')
return {}
return cpstats.extrapolate_statistics(logging.statistics)

return {}
Expand Down

0 comments on commit cb88960

Please sign in to comment.