Amaury Forgeot d'Arc added the comment: > 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()... ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1860> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com