FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 08-05-2010, 03:12 PM
David Lehman
 
Default Use part instead of device in PartitionWindow.populate() (#575749)

On Thu, 2010-08-05 at 04:49 -1000, David Cantrell wrote:
> 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 | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/iw/partition_gui.py b/iw/partition_gui.py
> index 4ccac2c..a889b7a 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
> @@ -1081,7 +1081,7 @@ class PartitionWindow(InstallWindow):
> else:
> sizestr = "%Ld" % (size)
> self.tree[iter]['Size (MB)'] = sizestr
> - self.tree[iter]['PyObject'] = device
> + self.tree[iter]['PyObject'] = part
>
> part = part.nextPartition()
> else:

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)


Dave

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 08-05-2010, 03:18 PM
David Lehman
 
Default Use part instead of device in PartitionWindow.populate() (#575749)

On Thu, 2010-08-05 at 10:12 -0500, David Lehman wrote:
> On Thu, 2010-08-05 at 04:49 -1000, David Cantrell wrote:
> > 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 | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/iw/partition_gui.py b/iw/partition_gui.py
> > index 4ccac2c..a889b7a 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
> > @@ -1081,7 +1081,7 @@ class PartitionWindow(InstallWindow):
> > else:
> > sizestr = "%Ld" % (size)
> > self.tree[iter]['Size (MB)'] = sizestr
> > - self.tree[iter]['PyObject'] = device
> > + self.tree[iter]['PyObject'] = part
> >
> > part = part.nextPartition()
> > else:
>

I think I missed by just a bit on this. What probably needs updating is
PartitionWindow.treeActivateCB (the part that expects PyObject to be
None in the case of free space).

Dave

> 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)
>
>
> Dave
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 08-05-2010, 05:15 PM
David Lehman
 
Default Use part instead of device in PartitionWindow.populate() (#575749)

> >> 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.


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org