MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / patch_sys_module

Function patch_sys_module

_pydev_bundle/_pydev_sys_patch.py:4–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3
4def patch_sys_module():
5 def patched_exc_info(fun):
6 def pydev_debugger_exc_info():
7 type, value, traceback = fun()
8 if type == ImportError:
9 # we should not show frame added by plugin_import call
10 if traceback and hasattr(traceback, "tb_next"):
11 return type, value, traceback.tb_next
12 return type, value, traceback
13
14 return pydev_debugger_exc_info
15
16 system_exc_info = sys.exc_info
17 sys.exc_info = patched_exc_info(system_exc_info)
18 if not hasattr(sys, "system_exc_info"):
19 sys.system_exc_info = system_exc_info
20
21
22def patched_reload(orig_reload):

Callers 2

pydev_debugger_reloadFunction · 0.85

Calls 1

patched_exc_infoFunction · 0.85

Tested by

no test coverage detected