Commit a6bc1eeb authored by Stavros Sachtouris's avatar Stavros Sachtouris Committed by Giorgos Korfiatis
Browse files

Allow syncer init errors to reach caller

parent 0724292d
...@@ -456,6 +456,7 @@ class WebSocketProtocol(WebSocket): ...@@ -456,6 +456,7 @@ class WebSocketProtocol(WebSocket):
except KeyError: except KeyError:
pass pass
syncer_ = None
try: try:
syncer_settings = setup.SyncerSettings( syncer_settings = setup.SyncerSettings(
self.settings['url'], self.settings['token'], self.settings['url'], self.settings['token'],
...@@ -466,9 +467,6 @@ class WebSocketProtocol(WebSocket): ...@@ -466,9 +467,6 @@ class WebSocketProtocol(WebSocket):
syncer_ = syncer.FileSyncer(syncer_settings, master, slave) syncer_ = syncer.FileSyncer(syncer_settings, master, slave)
self.syncer_settings = syncer_settings self.syncer_settings = syncer_settings
syncer_.initiate_probe() syncer_.initiate_probe()
except setup.ClientError:
syncer_ = None
raise
finally: finally:
with SYNCERS.lock() as d: with SYNCERS.lock() as d:
d[0] = syncer_ d[0] = syncer_
......
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