Skip to content

Commit

Permalink
Never throw an exception from find_source_lines
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrout committed Nov 20, 2022
1 parent 0cf2123 commit 0bad685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/core/oinspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def find_source_lines(obj, return_length=False):
lines = inspect.getsourcelines(obj.__class__)
except (OSError, TypeError):
return None
except OSError:
except:
return None

if return_length:
Expand Down

0 comments on commit 0bad685

Please sign in to comment.