This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, tzot
Date 2008-01-17.13:59:19
SpamBayes Score 0.0008030177
Marked as misclassified No
Message-id <1200578375.75.0.806297720527.issue1860@psf.upfronthosting.co.za>
In-reply-to
Content
> traceback.print_last() depends on the existence of sys.last_type
Yes, that is exactly as documented:

>>> help(traceback.print_last)
Help on function print_last in module traceback:
print_last(limit=None, file=None)
    This is a shorthand for 'print_exception(sys.last_type,
    sys.last_value, sys.last_traceback, limit, file)'.

Furthermore, in the doc:
http://docs.python.org/dev/library/sys.html#sys.last_type
    "... they are set when an exception is not handled ..."
In your script, you *are* handling the exception. 
Your script really should use traceback.print_exc() instead.
BTW, your patch basically makes print_last() identical to print_exc()...
History
Date User Action Args
2008-01-17 13:59:35amaury.forgeotdarcsetspambayes_score: 0.000803018 -> 0.0008030177
recipients: + amaury.forgeotdarc, tzot
2008-01-17 13:59:35amaury.forgeotdarcsetspambayes_score: 0.000803018 -> 0.000803018
messageid: <1200578375.75.0.806297720527.issue1860@psf.upfronthosting.co.za>
2008-01-17 13:59:20amaury.forgeotdarclinkissue1860 messages
2008-01-17 13:59:19amaury.forgeotdarccreate