Skip to content

Commit

Permalink
Remove unnecessary get_file_type check
Browse files Browse the repository at this point in the history
  • Loading branch information
rchiodo committed Oct 16, 2024
1 parent 872a0d5 commit ff3e742
Show file tree
Hide file tree
Showing 3 changed files with 2,966 additions and 3,087 deletions.
7 changes: 0 additions & 7 deletions _pydevd_sys_monitoring/_pydevd_sys_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ def _get_unhandled_exception_frame(depth: int) -> Optional[FrameType]:
del _thread_local_info.f_unhandled
raise AttributeError("Unhandled frame from different exception")
except:
py_db = GlobalDebuggerHolder.global_dbg
if py_db is None:
return None

f_unhandled = _getframe(depth)

while f_unhandled is not None and f_unhandled.f_back is not None:
Expand Down Expand Up @@ -226,9 +222,6 @@ def _get_unhandled_exception_frame(depth: int) -> Optional[FrameType]:
elif name == "runpy":
if f_back.f_code.co_name.startswith(("run", "_run")):
break

elif py_db.get_file_type(f_back) is PYDEV_FILE:
break

f_unhandled = f_back

Expand Down
Loading

0 comments on commit ff3e742

Please sign in to comment.