Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 300ce19 commit ae40c2fCopy full SHA for ae40c2f
1 file changed
Lib/cookielib.py
@@ -49,10 +49,11 @@ def reraise_unmasked_exceptions(unmasked=()):
49
if issubclass(etype, unmasked):
50
raise
51
# swallowed an exception
52
- import warnings
53
- warnings.warn("cookielib bug!", stacklevel=2)
54
- import traceback
55
- traceback.print_exc()
+ import warnings, traceback, StringIO
+ f = StringIO.StringIO()
+ traceback.print_exc(None, f)
+ msg = f.getvalue()
56
+ warnings.warn("cookielib bug!\n%s" % msg, stacklevel=2)
57
58
59
# Date/time conversion
0 commit comments