Add a try-catch around the realtime logs stuff

This commit is contained in:
Joseph Schorr 2015-02-17 19:18:56 -05:00
parent ff7e97faf7
commit 854c6e8ba3

View file

@ -34,6 +34,7 @@ def ps():
except:
pass
try:
data = {
'count': {
'cpu': psutil.cpu_percent(interval=1, percpu=True),
@ -45,6 +46,9 @@ def ps():
},
'build': build_status
}
except psutil.AccessDenied:
data = {}
json_string = json.dumps(data)
yield 'data: %s\n\n' % json_string
time.sleep(1)