diff options
author | Chris Lumens <clumens@redhat.com> | 2006-09-08 16:07:21 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2006-09-08 16:07:21 +0000 |
commit | 40a576e8e088e32f04928b23d1a22f6d11806c80 (patch) | |
tree | f522197bd3499f9c802f297fc4bbdb5a2f7f5f28 /exception.py | |
parent | b12f2356103b81802ca5904f612c755d3794f3e2 (diff) | |
download | anaconda-40a576e8e088e32f04928b23d1a22f6d11806c80.tar.gz anaconda-40a576e8e088e32f04928b23d1a22f6d11806c80.tar.xz anaconda-40a576e8e088e32f04928b23d1a22f6d11806c80.zip |
Print tracebacks with the most recent call first. This is going to take
some getting used to (#204817).
Diffstat (limited to 'exception.py')
-rw-r--r-- | exception.py | 11 |
1 files changed, 10 insertions, 1 deletions
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 |