Commit e89d682b authored by Mark Sapiro's avatar Mark Sapiro

Avoid new flake8 3.5.0 E722, bare except:.

parent 50007671
......@@ -69,7 +69,7 @@ class Workflow:
return step()
except IndexError:
raise StopIteration
except:
except: # noqa: E722
log.exception('deque: {}'.format(COMMASPACE.join(self._next)))
raise
......
......@@ -70,7 +70,7 @@ class ReopenableFileHandler(logging.Handler):
if msg[-1] != '\n':
stream.write('\n')
self.flush()
except:
except: # noqa: E722 pragma: nocover
self.handleError(record)
def close(self):
......
......@@ -39,7 +39,7 @@ class ModelMeta:
# order. http://tinyurl.com/on8dy6f
for table in reversed(Model.metadata.sorted_tables):
connection.execute(table.delete())
except:
except: # noqa: E722 pragma: nocover
transaction.rollback()
raise
else:
......
......@@ -28,7 +28,7 @@ def transaction():
"""Context manager for ensuring the transaction is complete."""
try:
yield
except:
except: # noqa: E722
config.db.abort()
raise
else:
......@@ -50,7 +50,7 @@ def transactional(function):
rtn = function(*args, **kws)
config.db.commit()
return rtn
except:
except: # noqa: E722 pragma: nocover
config.db.abort()
raise
return wrapper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment