mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Merge pull request #760 from notFloran/fix-debug-file-not-exist
Debug and WebUI : don't crash when the file does not exist
This commit is contained in:
commit
e217ff7ee5
@ -216,8 +216,11 @@ class GlancesBottle(object):
|
||||
|
||||
if self.args.debug:
|
||||
fname = os.path.join(tempfile.gettempdir(), 'glances-debug.json')
|
||||
try:
|
||||
with open(fname) as f:
|
||||
return f.read()
|
||||
except IOError:
|
||||
logger.debug("Debug file (%s) not found" % fname)
|
||||
|
||||
# Update the stat
|
||||
self.stats.update()
|
||||
|
Loading…
Reference in New Issue
Block a user