summaryrefslogtreecommitdiffstats
path: root/rescue.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-03-16 14:20:54 +0000
committerErik Troan <ewt@redhat.com>2001-03-16 14:20:54 +0000
commit1978bc90c9dc4cdc7adddeb5dcbf3643cab4f0c7 (patch)
tree65feaac4ea146beb9d36b280c2dc17718075dcce /rescue.py
parent04ea8b51cd366e59d21f5507acf2ae3ee5f95707 (diff)
downloadanaconda-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.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/rescue.py b/rescue.py
index f117f2f21..6697f5a43 100644
--- a/rescue.py
+++ b/rescue.py
@@ -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"