diff options
-rw-r--r-- | fstab.py | 5 | ||||
-rw-r--r-- | rescue.py | 2 | ||||
-rw-r--r-- | upgrade.py | 5 |
3 files changed, 7 insertions, 5 deletions
@@ -799,7 +799,7 @@ class Fstab: return 0 - def mountFilesystems(self, instPath): + def mountFilesystems(self, instPath, raiseErrors = 0): if (not self.setupFilesystems): return self.startExistingRaid() @@ -820,12 +820,13 @@ class Fstab: iutil.mkdirChain(instPath + mntpoint) isys.mount(device, instPath + mntpoint, fstype = fsystem) except SystemError, (errno, msg): + if raiseErrors: + raise SystemError, (errno, msg) self.messageWindow(_("Error"), _("Error mounting device %s as %s: %s\n\n" "This most likely means this partition has " "not been formatted.\n\nPress OK to reboot your " "system.") % (device, mntpoint, msg)) -# raise SystemError, (errno, msg) sys.exit(0) try: @@ -84,7 +84,7 @@ def runRescue(serial): "automatically when you exit from the shell."), [_("OK")] ) rootmounted = 1 - except SystemError, msg: + except SystemError: 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" diff --git a/upgrade.py b/upgrade.py index 788734b82..e15f83637 100644 --- a/upgrade.py +++ b/upgrade.py @@ -72,7 +72,8 @@ def findExistingRoots (intf, theFstab): win.pop () return rootparts -def mountRootPartition(intf, rootInfo, theFstab, instPath, allowDirty = 0): +def mountRootPartition(intf, rootInfo, theFstab, instPath, allowDirty = 0, + raiseErrors = 0): (root, rootFs) = rootInfo mdList = raid.startAllRaid(theFstab.driveList()) @@ -100,4 +101,4 @@ def mountRootPartition(intf, rootInfo, theFstab, instPath, allowDirty = 0): "shut down cleanly to upgrade.")) sys.exit(0) - theFstab.mountFilesystems (instPath) + theFstab.mountFilesystems (instPath, raiseErrors = raiseErrors) |