diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-10-25 13:16:08 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2017-10-27 16:01:48 -0300 |
commit | ed48667738335c0f54f0e522c684231f2b740403 (patch) | |
tree | 5ee6cd775877e444bd44a12bc9fda14737eb32c5 /src/leap/soledad/client | |
parent | 99658eb24a2cd2bb2c23147a837f9402c11de160 (diff) |
[style] E722 do not use bare except
Diffstat (limited to 'src/leap/soledad/client')
-rw-r--r-- | src/leap/soledad/client/_db/adbapi.py | 4 | ||||
-rw-r--r-- | src/leap/soledad/client/incoming.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/leap/soledad/client/_db/adbapi.py b/src/leap/soledad/client/_db/adbapi.py index 5c28d108..7deb0feb 100644 --- a/src/leap/soledad/client/_db/adbapi.py +++ b/src/leap/soledad/client/_db/adbapi.py @@ -275,11 +275,11 @@ class U1DBConnectionPool(adbapi.ConnectionPool): trans.close() conn.commit() return result - except: + except Exception: excType, excValue, excTraceback = sys.exc_info() try: conn.rollback() - except: + except Exception: logger.error(None, "Rollback failed") compat.reraise(excValue, excTraceback) diff --git a/src/leap/soledad/client/incoming.py b/src/leap/soledad/client/incoming.py index aa7065e8..0766040f 100644 --- a/src/leap/soledad/client/incoming.py +++ b/src/leap/soledad/client/incoming.py @@ -85,7 +85,7 @@ class IncomingBoxProcessingLoop: for consumer in self.consumers: try: parts = yield consumer.process(item, item_id=item_id) - except: + except Exception: msg = "Consumer %s failed to process item %s: %s" msg %= (consumer.name, item_id, sys.exc_info()[0]) log.error(msg) @@ -94,7 +94,7 @@ class IncomingBoxProcessingLoop: yield self.incoming_box.set_processed(item_id) try: yield consumer.save(parts, item_id=item_id) - except: + except Exception: msg = "Consumer %s failed to save item %s: %s" msg %= (consumer.name, item_id, sys.exc_info()[0]) log.error(msg) @@ -133,7 +133,7 @@ class IncomingBox: try: yield self.blob_manager.set_flags(blob_id, [Flags.PROCESSING], namespace=self.namespace) - except: + except Exception: defer.returnValue(None) blob = yield self.blob_manager.get(blob_id, namespace=self.namespace) defer.returnValue(blob) |