From fda20fb5105067985048becd486c8c8eb6e2aff1 Mon Sep 17 00:00:00 2001 From: Erik Troan Date: Sat, 17 Jun 2000 20:18:37 +0000 Subject: began adding crash dump facility --- anaconda | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'anaconda') diff --git a/anaconda b/anaconda index 4cfa5948e..227c89262 100755 --- a/anaconda +++ b/anaconda @@ -33,6 +33,7 @@ if len(sys.argv) > 1: import traceback import string +from pickle import Pickler import isys import iutil @@ -411,12 +412,14 @@ if reconfigOnly: setupFilesystems = 0 rootPath = '/' +todo = ToDo(intf, method, rootPath, installSystem = installPackages, + setupFilesystems = setupFilesystems, mouse = mouseInfo, + instClass = instClass, x = x, expert = expert, + serial = serial, reconfigOnly = reconfigOnly, test = test, + extraModules = extraModules) + try: - todo = ToDo(intf, method, rootPath, installSystem = installPackages, - setupFilesystems = setupFilesystems, mouse = mouseInfo, - instClass = instClass, x = x, expert = expert, - serial = serial, reconfigOnly = reconfigOnly, test = test, - extraModules = extraModules) + raise ValueError, "something went wrong" intf.run(todo, test = test) except SystemExit, code: intf.shutdown() @@ -427,10 +430,22 @@ except: text = joinfields (list, "") rc = intf.exceptionWindow (_("Exception Occurred"), text) intf.__del__ () - if rc: + if rc == 1: print text import pdb pdb.post_mortem (tb) + elif rc == 2: + out = open("anacdump.txt", "w") + p = Pickler(out) + + out.write(text) + + out.write("\nToDo object:\n") + todo.intf = None + todo.fstab = None + p.dump(todo) + + out.close() os._exit (1) del intf -- cgit