Kaydet (Commit) ae40c2f7 authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

[Patch #969907] Add traceback to warning output

üst 300ce195
......@@ -49,10 +49,11 @@ def reraise_unmasked_exceptions(unmasked=()):
if issubclass(etype, unmasked):
raise
# swallowed an exception
import warnings
warnings.warn("cookielib bug!", stacklevel=2)
import traceback
traceback.print_exc()
import warnings, traceback, StringIO
f = StringIO.StringIO()
traceback.print_exc(None, f)
msg = f.getvalue()
warnings.warn("cookielib bug!\n%s" % msg, stacklevel=2)
# Date/time conversion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment