Skip to content

Commit 1685763

Browse files
committed
only-catch-exceptions
1 parent 9b792c7 commit 1685763

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

IPython/core/guarded_eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ def dummy_function(*args, **kwargs):
835835
if isinstance(node, ast.For):
836836
try:
837837
iterable = eval_node(node.iter, context)
838-
except:
838+
except Exception:
839839
iterable = None
840840

841841
sample = None
@@ -855,7 +855,7 @@ def dummy_function(*args, **kwargs):
855855
targets=[node.target], value=ast.Constant(value=sample)
856856
)
857857
_handle_assign(fake_assign, loop_context)
858-
except:
858+
except Exception:
859859
pass
860860

861861
result = None

0 commit comments

Comments
 (0)