[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] (revised patch) Use part instead of device in PartitionWindow.populate() (#575749)



On Thu, 5 Aug 2010, David Lehman wrote:

This seems right, except that deleteCB and editCB will need some
updating to handle the possibility that DiskTreeModel will return a
parted.Partition instance, eg:

    device = self.tree.getCurrentDevice()
    if device.partitioned:

and

    device = self.tree.getCurrentDevice()
    reason = self.storage.deviceImmutable(device, ignoreProtected=True)



So I can disregard this part?

Yes.

Revised patch:


Use part instead of device in PartitionWindow.populate() (#575749)

In the else clause near the end of the PartitionWindow.populate(), we
are referencing 'device' when we should be using 'part'.  If we enter
this block, it means device is None.
---
 iw/partition_gui.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 4ccac2c..e064757 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1070,7 +1070,7 @@ class PartitionWindow(InstallWindow):
                             devstring = _("Free")
                             ptype = ""
                         else:
-                            devstring = device.name
+                            devstring = partName
                             ptype = _("Extended")

                         self.tree[iter]['Device'] = devstring


--
David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]