summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-07-12 20:05:46 +0000
committerMatt Wilson <msw@redhat.com>2000-07-12 20:05:46 +0000
commitf9b0aace80f9b2068e7f7882c3071c5069ae2b53 (patch)
tree81c96f35a6897e784dd04fdfc641120144ba7c08 /anaconda
parent4c8bdafebc9299559041cec222f33512dfb3577e (diff)
downloadanaconda-f9b0aace80f9b2068e7f7882c3071c5069ae2b53.tar.gz
anaconda-f9b0aace80f9b2068e7f7882c3071c5069ae2b53.tar.xz
anaconda-f9b0aace80f9b2068e7f7882c3071c5069ae2b53.zip
rework exception handling in GUI so we can catch during the todo.doinstall, use pc104 as default kbd
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda72
1 files changed, 2 insertions, 70 deletions
diff --git a/anaconda b/anaconda
index 23bc270ad..3b1deb0f1 100755
--- a/anaconda
+++ b/anaconda
@@ -33,11 +33,11 @@ if len(sys.argv) > 1:
import traceback
import string
-from cPickle import Pickler
import isys
import iutil
from translate import _
+from exception import handleException
setverPath = None
@@ -424,74 +424,6 @@ try:
except SystemExit, code:
intf.shutdown()
except:
- (type, value, tb) = sys.exc_info()
- from string import joinfields
- list = traceback.format_exception (type, value, tb)
- text = joinfields (list, "")
- rc = intf.exceptionWindow (_("Exception Occurred"), text)
- if rc == 1:
- intf.__del__ ()
- print text
- import pdb
- pdb.post_mortem (tb)
- elif not rc:
- intf.__del__ ()
- os._exit(1)
-
- while 1:
- rc = intf.dumpWindow()
- if rc:
- intf.__del__ ()
- os._exit(1)
-
- device = todo.fdDevice
- file = "/tmp/floppy"
- try:
- isys.makeDevInode(device, file)
- except SystemError:
- pass
- try:
- fd = os.open(file, os.O_RDONLY)
- except:
- continue
-
- os.close(fd)
-
- args = [ "mkdosfs", '/tmp/floppy' ]
-
- cmd = "/usr/sbin/mkdosfs"
- if os.access("/sbin/mkdosfs", os.X_OK):
- cmd = "/sbin/mkdosfs"
-
- iutil.execWithRedirect (cmd, args,
- stdout = '/dev/tty5', stderr = '/dev/tty5')
- isys.mount(device, "/tmp/crash", fstype = "vfat")
-
- out = open("/tmp/crash/anacdump.txt", "w")
- p = Pickler(out)
-
- out.write(text)
-
- trace = tb
- while trace.tb_next:
- trace = trace.tb_next
- frame = trace.tb_frame
- out.write ("\nLocal variables in innermost frame:\n")
- for (key, value) in frame.f_locals.items():
- out.write ("%s: %s\n" % (key, value))
-
- out.write("\nToDo object:\n")
- todo.intf = None
- todo.fstab = None
- todo.comps = None
- todo.hdList = None
-
- p.dump(todo)
-
- out.close()
- isys.umount("/tmp/crash")
-
- intf.__del__ ()
- os._exit (1)
+ handleException(todo, sys.exc_info())
del intf