MCPcopy Index your code
hub / github.com/python/cpython / wrapper

Method wrapper

Lib/bdb.py:89–109  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

87
88 @functools.wraps(func)
89 def wrapper(*args):
90 if self._tracing_thread != threading.current_thread():
91 return
92 try:
93 frame = sys._getframe().f_back
94 ret = func(frame, *args)
95 if self._enabled and frame.f_trace:
96 self.update_local_events()
97 if (
98 self._disable_current_event
99 and event not in (E.PY_THROW, E.PY_UNWIND, E.RAISE)
100 ):
101 return sys.monitoring.DISABLE
102 else:
103 return ret
104 except BaseException:
105 self.stop_trace()
106 sys._getframe().f_back.f_trace = None
107 raise
108 finally:
109 self._disable_current_event = False
110
111 return wrapper
112

Callers

nothing calls this directly

Calls 3

update_local_eventsMethod · 0.95
stop_traceMethod · 0.95
funcFunction · 0.50

Tested by

no test coverage detected