diff options
Diffstat (limited to 'client/src/leap')
-rw-r--r-- | client/src/leap/soledad/client/http_target.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/leap/soledad/client/http_target.py b/client/src/leap/soledad/client/http_target.py index f5d8ef1c..31729e2c 100644 --- a/client/src/leap/soledad/client/http_target.py +++ b/client/src/leap/soledad/client/http_target.py @@ -527,8 +527,11 @@ class SoledadHTTPSyncTarget(SyncTarget): raise errors.BrokenSyncStream data = parts[1:-1] # decode metadata - line, comma = utils.check_and_strip_comma(data[0]) - metadata = None + try: + line, comma = utils.check_and_strip_comma(data[0]) + metadata = None + except (IndexError): + raise errors.BrokenSyncStream try: metadata = json.loads(line) new_generation = metadata['new_generation'] |