Matthew Patton <patto...@yahoo.com> added the comment: "exc_info which, if it does not evaluate as false", so we provide '1' or 'True'. The IF passes and immediately the formatter tries to dereference it blindly assuming it's Tuple and throws an Exception.
Either the Formatter needs to guard itself (best) or the caller needs to check the Type before allowing a call to the Formatter to go thru. Should sys.exc_info() have already been called then the Tuple can have a valid frame reference or it's 3 None's. In this last case the Formatter is emitting a naked, zero context "NoneType None" line into the middle of the stack trace which is just annoying and pointless. Again, I probably should have written the guard at the formatter to emit nothing when the field is None. It actually checks for the 2nd and 3rd fields, not the first. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30767> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com