MCPcopy
hub / github.com/treeverse/dvc / show_stack

Function show_stack

dvc/_debug.py:145–158  ·  view source on GitHub ↗

r"""Show stack trace on SIGQUIT (Ctrl-\) or SIGINFO (Ctrl-T on macOS).

()

Source from the content-addressed store, hash-verified

143
144@contextmanager
145def show_stack():
146 r"""Show stack trace on SIGQUIT (Ctrl-\) or SIGINFO (Ctrl-T on macOS)."""
147 import signal
148 import sys
149
150 if sys.platform != "win32":
151 signal.signal(signal.SIGQUIT, _sigshow)
152
153 try:
154 # only available on macOS
155 signal.signal(signal.SIGINFO, _sigshow) # type: ignore[attr-defined]
156 except AttributeError:
157 pass
158 yield
159
160
161def _get_path_func(tool: str, ext: str):

Callers 1

debugtoolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected