diff options
author | Erik Troan <ewt@redhat.com> | 2001-03-16 14:20:54 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-03-16 14:20:54 +0000 |
commit | 1978bc90c9dc4cdc7adddeb5dcbf3643cab4f0c7 (patch) | |
tree | 65feaac4ea146beb9d36b280c2dc17718075dcce /rescue.py | |
parent | 04ea8b51cd366e59d21f5507acf2ae3ee5f95707 (diff) | |
download | anaconda-1978bc90c9dc4cdc7adddeb5dcbf3643cab4f0c7.tar.gz anaconda-1978bc90c9dc4cdc7adddeb5dcbf3643cab4f0c7.tar.xz anaconda-1978bc90c9dc4cdc7adddeb5dcbf3643cab4f0c7.zip |
be much more agressive about catching exceptions
Diffstat (limited to 'rescue.py')
-rw-r--r-- | rescue.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -3,6 +3,7 @@ from snack import * from text import WaitWindow, OkCancelWindow from translate import _ import _balkan +import sys import raid import os from log import log @@ -108,7 +109,15 @@ def runRescue(url, serial): "automatically when you exit from the shell."), [_("OK")] ) rootmounted = 1 - except SystemError: + except: + # This looks horrible, but all it does is catch every exception, + # and reraise those in the tuple check. This lets programming + # errors raise exceptions, while any runtime error will + # still result in a shell. + (exc, val) = sys.exc_info()[0:2] + if exc in (IndexError, ValueError, SyntaxError): + raise exc, val, sys.exc_info()[2] + ButtonChoiceWindow(screen, _("Rescue"). _("An error occured trying to mount some or all of your " "system. Some of it may be mounted under /mnt/sysimage.\n\n" |