summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-08-14 21:42:10 +0000
committerMike Fulbright <msf@redhat.com>2002-08-14 21:42:10 +0000
commita52640636e28c02797352ce50a6f8ea49cff8ecc (patch)
treea3b0afeab7ea67bae6ad29aa8fe6401f4b363f27 /textw
parent3673d4b827f0d445d30d7a95f825d5019ec8aaa7 (diff)
downloadanaconda-a52640636e28c02797352ce50a6f8ea49cff8ecc.tar.gz
anaconda-a52640636e28c02797352ce50a6f8ea49cff8ecc.tar.xz
anaconda-a52640636e28c02797352ce50a6f8ea49cff8ecc.zip
fix for bug #66900
Diffstat (limited to 'textw')
-rw-r--r--textw/partition_text.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/textw/partition_text.py b/textw/partition_text.py
index 9ee81cca9..01ef4ca6e 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -191,10 +191,25 @@ class PartitionWindow:
# XXX need some way to stay at the same place in the list after
# repopulating
+ # 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:
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))
rc = -1