diff options
author | drebs <drebs@leap.se> | 2014-07-08 12:59:24 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2014-07-08 12:59:24 -0300 |
commit | d7872cfde8044f064eb76a0ce647c5ba69099fe5 (patch) | |
tree | fcd7c61a44a9035b1c7573d0e4436911ceaed1b9 /client | |
parent | cb971e9f6a722a20c4fec278dc56ce8ec30740ab (diff) |
Fix common exception handling gotchas.
Diffstat (limited to 'client')
-rw-r--r-- | client/src/leap/soledad/client/target.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/leap/soledad/client/target.py b/client/src/leap/soledad/client/target.py index 7e563823..48472c53 100644 --- a/client/src/leap/soledad/client/target.py +++ b/client/src/leap/soledad/client/target.py @@ -860,7 +860,7 @@ class SoledadSyncTarget(HTTPSyncTarget, TokenBasedAuth): new_generation = metadata['new_generation'] new_transaction_id = metadata['new_transaction_id'] number_of_changes = metadata['number_of_changes'] - except json.JSONDecodeError, KeyError: + except (json.JSONDecodeError, KeyError): raise errors.BrokenSyncStream # make sure we have replica_uid from fresh new dbs if self._ensure_callback and 'replica_uid' in metadata: @@ -879,7 +879,7 @@ class SoledadSyncTarget(HTTPSyncTarget, TokenBasedAuth): content = entry['content'] gen = entry['gen'] trans_id = entry['trans_id'] - except IndexError, KeyError: + except (IndexError, KeyError): raise errors.BrokenSyncStream return new_generation, new_transaction_id, number_of_changes, \ doc_id, rev, content, gen, trans_id |