summaryrefslogtreecommitdiff
path: root/client/src
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2015-08-05 16:57:17 -0300
committerBruno Wagner <bwgpro@gmail.com>2015-08-05 16:59:05 -0300
commit45c684100ffc611509b76549fbb2b93f2d21e41b (patch)
treefbd1606d92da7526c1b39998b6b8503713027193 /client/src
parent66f07534a611056214e4f8b02e0143944b816c39 (diff)
[tests] Fixed remaining parse tests
All the response parse tests are passing now, response with no entries was broken because it wasn't being treated and the others were broken because of calls that no longer existed
Diffstat (limited to 'client/src')
-rw-r--r--client/src/leap/soledad/client/http_target.py7
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']