Merge pull request #4213 from asottile/flake8_master_fixes
Fixes for flake8 master
This commit is contained in:
commit
799b72cf6f
|
@ -1,6 +1,5 @@
|
|||
|
||||
def test_exception_syntax():
|
||||
try:
|
||||
0 / 0
|
||||
except ZeroDivisionError, e:
|
||||
pass
|
||||
assert e
|
||||
|
|
|
@ -2,4 +2,4 @@ def test_exception_syntax():
|
|||
try:
|
||||
0 / 0
|
||||
except ZeroDivisionError as e:
|
||||
pass
|
||||
assert e
|
||||
|
|
|
@ -706,10 +706,9 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
setattr(node, name, new)
|
||||
elif (
|
||||
isinstance(field, ast.AST)
|
||||
and
|
||||
# Don't recurse into expressions as they can't contain
|
||||
# asserts.
|
||||
not isinstance(field, ast.expr)
|
||||
and not isinstance(field, ast.expr)
|
||||
):
|
||||
nodes.append(field)
|
||||
|
||||
|
|
|
@ -245,8 +245,8 @@ def make_numbered_dir_with_cleanup(root, prefix, keep, lock_timeout):
|
|||
p = make_numbered_dir(root, prefix)
|
||||
lock_path = create_cleanup_lock(p)
|
||||
register_cleanup_lock_removal(lock_path)
|
||||
except Exception as e:
|
||||
pass
|
||||
except Exception as exc:
|
||||
e = exc
|
||||
else:
|
||||
consider_lock_dead_if_created_before = p.stat().st_mtime - lock_timeout
|
||||
cleanup_numbered_dir(
|
||||
|
|
Loading…
Reference in New Issue