Clear exception information in Python 2 (PY-21215)

It's needed for example for celery's retry for task. The fix suggested by Krzysztof Nazarewski.
This commit is contained in:
Elizaveta Shashkova
2016-10-27 17:13:52 +03:00
parent 55fa4fe122
commit 95c8699581
+5 -1
View File
@@ -1544,7 +1544,11 @@ if __name__ == '__main__':
from _pydevd_bundle import pydevd_stackless
pydevd_stackless.patch_stackless()
except:
pass # It's ok not having stackless there...
# It's ok not having stackless there...
try:
sys.exc_clear() # the exception information should be cleaned in Python 2
except:
pass
is_module = setup['module']
patch_stdin(debugger)