diff options
author | Mike Fulbright <msf@redhat.com> | 2002-08-14 21:42:10 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2002-08-14 21:42:10 +0000 |
commit | a52640636e28c02797352ce50a6f8ea49cff8ecc (patch) | |
tree | a3b0afeab7ea67bae6ad29aa8fe6401f4b363f27 /iw/partition_gui.py | |
parent | 3673d4b827f0d445d30d7a95f825d5019ec8aaa7 (diff) | |
download | anaconda-a52640636e28c02797352ce50a6f8ea49cff8ecc.tar.gz anaconda-a52640636e28c02797352ce50a6f8ea49cff8ecc.tar.xz anaconda-a52640636e28c02797352ce50a6f8ea49cff8ecc.zip |
fix for bug #66900
Diffstat (limited to 'iw/partition_gui.py')
-rw-r--r-- | iw/partition_gui.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py index 7e6ffa57b..97443f854 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -79,6 +79,7 @@ new_checkmark = new_checkmark + "\0\0\0\0\0\0\0\0\0\0\15\0\0\0r\0\0\0\263\0\0\0i new_checkmark = new_checkmark + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0g\0\0" new_checkmark = new_checkmark + "\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + class DiskStripeSlice: def eventHandler(self, widget, event): if event.type == gtk.gdk.BUTTON_PRESS: @@ -944,10 +945,26 @@ class PartitionWindow(InstallWindow): def refresh(self): self.diskStripeGraph.shutDown() self.tree.clear() + + # XXXX - Backup some info which doPartitioning munges if it fails + origInfoDict = {} + for request in self.partitions.requests: + try: + origInfoDict[request.uniqueID] = (request.requestSize, request.currentDrive) + except: + pass + try: autopart.doPartitioning(self.diskset, self.partitions) rc = 0 except PartitioningError, msg: + try: + for request in self.partitions.requests: + if request.uniqueID in origInfoDict.keys(): + (request.requestSize, request.currentDrive) = origInfoDict[request.uniqueID] + except: + log("Failed to restore original info") + self.intf.messageWindow(_("Error Partitioning"), _("Could not allocate requested partitions: %s.") % (msg), custom_icon="error") |