diff options
author | Jeremy Katz <katzj@redhat.com> | 2008-03-27 15:36:03 -0400 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2008-03-27 15:36:03 -0400 |
commit | f71d691f808e0aeaaceb1cec5ae216e9cc27b8df (patch) | |
tree | 38b6346a0b4bdfb35dbd28a32eca22afa57a10b2 /exception.py | |
parent | 0de6e488fc0919d97d094f65d91da0f66c02b04e (diff) | |
download | anaconda-f71d691f808e0aeaaceb1cec5ae216e9cc27b8df.tar.gz anaconda-f71d691f808e0aeaaceb1cec5ae216e9cc27b8df.tar.xz anaconda-f71d691f808e0aeaaceb1cec5ae216e9cc27b8df.zip |
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
Diffstat (limited to 'exception.py')
-rw-r--r-- | exception.py | 17 |
1 files changed, 17 insertions, 0 deletions
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) |