summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-10-04 15:52:51 -0300
committerdrebs <drebs@riseup.net>2017-10-05 09:43:40 -0300
commit649f99551a18ae16ae25e9d7cc042c216ca34561 (patch)
treeaa1d9b83ab1aa8b8c5d40d083dcd42b8e3d235d6
parent64a08c836374bceb6e3d0813fb918dfd3f570852 (diff)
[style] use python3 compatible try/except syntax
-rw-r--r--src/leap/soledad/client/_db/blobs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leap/soledad/client/_db/blobs.py b/src/leap/soledad/client/_db/blobs.py
index 73f011c2..afa4c79f 100644
--- a/src/leap/soledad/client/_db/blobs.py
+++ b/src/leap/soledad/client/_db/blobs.py
@@ -352,7 +352,7 @@ class BlobManager(object):
try:
yield self._encrypt_and_upload(blob_id, fd)
yield self.local.update_sync_status(blob_id, SyncStatus.SYNCED)
- except Exception, e:
+ except Exception as e:
yield self.local.increment_retries(blob_id)
_, retries = yield self.local.get_sync_status(blob_id)
if retries > self.max_retries:
@@ -398,7 +398,7 @@ class BlobManager(object):
yield self.refresh_sync_status_from_server(namespace)
yield self.fetch_missing(namespace)
yield self.send_missing(namespace)
- except defer.FirstError, e:
+ except defer.FirstError as e:
e.subFailure.raiseException()
@defer.inlineCallbacks
@@ -550,7 +550,7 @@ class BlobManager(object):
yield treq.collect(response, buf.write)
try:
fd, size = buf.close()
- except InvalidBlob, e:
+ except InvalidBlob as e:
_, retries = yield self.local.get_sync_status(blob_id)
message = "Corrupted blob received from server! ID: %s\n"
message += "Retries: %s - Attempts left: %s\n"