()
| 2 | |
| 3 | |
| 4 | def 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 | |
| 22 | def patched_reload(orig_reload): |
no test coverage detected