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

Function removeHandler

Lib/unittest/signals.py:57–71  ·  view source on GitHub ↗
(method=None)

Source from the content-addressed store, hash-verified

55
56
57def removeHandler(method=None):
58 if method is not None:
59 @wraps(method)
60 def inner(*args, **kwargs):
61 initial = signal.getsignal(signal.SIGINT)
62 removeHandler()
63 try:
64 return method(*args, **kwargs)
65 finally:
66 signal.signal(signal.SIGINT, initial)
67 return inner
68
69 global _interrupt_handler
70 if _interrupt_handler is not None:
71 signal.signal(signal.SIGINT, _interrupt_handler.original_handler)

Callers 1

innerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…