diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | exception.py | 11 |
2 files changed, 16 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2006-09-08 Chris Lumens <clumens@redhat.com> + + * exception.py (formatException): Reverse the order of how tracebacks + are printed in the UI so that the most recent call is listed first + (#204817). + 2006-09-07 Chris Lumens <clumens@redhat.com> * anaconda.spec: Bump version. diff --git a/exception.py b/exception.py index 31c859796..3325f963c 100644 --- a/exception.py +++ b/exception.py @@ -310,6 +310,15 @@ def copyExceptionToFloppy (anaconda): isys.umount("/tmp/crash") return 0 +# Reverse the order that tracebacks are printed so people will hopefully quit +# giving us the least useful part of the exception in bug reports. +def formatException (type, value, tb): + lst = traceback.format_tb(tb) + lst.reverse() + lst.insert(0, 'Traceback (most recent call first):\n') + lst.extend(traceback.format_exception_only(type, value)) + return lst + def handleException(anaconda, (type, value, tb)): if isinstance(value, bdb.BdbQuit): sys.exit(1) @@ -318,7 +327,7 @@ def handleException(anaconda, (type, value, tb)): sys.excepthook = sys.__excepthook__ # get traceback information - list = traceback.format_exception (type, value, tb) + list = formatException (type, value, tb) text = joinfields (list, "") # save to local storage first |