Commit b53e71cf authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Clean up get_status

parent ee0dc709
......@@ -272,15 +272,6 @@ class WebSocketProtocol(WebSocket):
""":return: updated status dict or value of specified key"""
if self.syncer and self.can_sync():
with self.status.lock() as d:
LOGGER.debug('Status was %s' % d['code'])
if d['code'] in (
if self.syncer.paused:
d['code'] = STATUS['PAUSED']
elif d['code'] != STATUS['PAUSING'] or (
d['unsynced'] == d['synced'] + d['failed']):
d['code'] = STATUS['SYNCING']
with self.status.lock() as d:
LOGGER.debug('Status is now %s' % d['code'])
return d.get(key, None) if key else dict(d)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment