From f71d691f808e0aeaaceb1cec5ae216e9cc27b8df Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Thu, 27 Mar 2008 15:36:03 -0400 Subject: Add support for saving the exception to a local directory for live installs If you're doing a live install, you often won't have removable media inserted but you _can_ just save the exception somewhere and then report it. So let's take advantage of that. Not implemented for text mode as text-mode live installs aren't that relevant --- exception.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'exception.py') diff --git a/exception.py b/exception.py index 0812210a9..080a60647 100644 --- a/exception.py +++ b/exception.py @@ -352,6 +352,23 @@ def runSaveDialog(anaconda, longTracebackFile): _("There was a problem writing the system state to the " "disk.")) continue + elif saveWin.saveToLocal(): + dest = saveWin.getDest() + try: + shutil.copyfile("/tmp/anacdump.txt", "%s/InstallError.txt" %(dest,)) + anaconda.intf.messageWindow(_("Dump Written"), + _("Your system's state has been successfully written to " + "the disk. The installer will now exit."), + type="custom", custom_icon="info", + custom_buttons=[_("_Exit installer")]) + sys.exit(0) + except Exception, e: + log.error("Failed to copy anacdump.txt to %s/anacdump.txt: %s" %(dest, e)) + else: + anaconda.intf.messageWindow(_("Dump Not Written"), + _("There was a problem writing the system state to the " + "disk.")) + continue else: scpInfo = saveWin.getDest() scpSucceeded = copyExceptionToRemote(anaconda.intf, scpInfo) -- cgit