Skip to content

Commit b8147e0

Browse files
committed
avoid side effect from overloaded getattr/setattr
1 parent 11e5cb0 commit b8147e0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ def _get_unhandled_exception_frame(exc, depth: int) -> Optional[FrameType]:
184184
# ENDIF
185185
# fmt: on
186186
try:
187-
tag = getattr(exc, '__pydevd_tag__', None)
188-
if tag is None:
189-
tag = UnhandledExceptionTag()
190-
exc.__pydevd_tag__ = tag
187+
tag = exc.__dict__.setdefault('__pydevd_tag__', UnhandledExceptionTag())
191188
except:
192189
tag = exc
193190

0 commit comments

Comments
 (0)