On Thu, Sep 17, 2009 at 04:46:20PM -1000, David Cantrell wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Comments inline. > > On Wed, 16 Sep 2009, Joel Granados Moreno wrote: > >> * iw/lvm_dialog_gui.py (run, convertToActions): New function. Need to >> have a separate function so we can run it from the editLVMLogicalVolume >> function in iw/partition_gui.py. We call new function from run. ... >> @@ -956,6 +958,8 @@ class VolumeGroupEditor: >> log.debug("finished editing vg") >> log.debug("pvs: %s" % [p.name for p in self.pvs]) >> log.debug("luks: %s" % self.luks.keys()) >> + volname = self.volnameEntry.get_text().strip() >> + pesize = int(self.peCombo.get_active_value()) / 1024.0 > > Should we wrap this in some input validation try/except statements? If This is actually not needed as the size of the Physical volume only accepts digits. So if you try to type 'steak', you will get nothing. > someone manages to enter 'steak' for the self.peCombo value, we could have > problems. > >> for lv in self.lvs.itervalues(): >> log.debug("lv %s" % lv) >> _luks = self.luks.get(lv['name']) >> diff --git a/iw/partition_gui.py b/iw/partition_gui.py >> index 5ebee3a..b16bd4b 100644 >> --- a/iw/partition_gui.py ... >> vgeditor.destroy() >> >> + def editLVMLogicalVolume (self, device): >> + vgeditor = lvm_dialog_gui.VolumeGroupEditor(self.anaconda, >> + self.intf, >> + self.parent, >> + device.vg, >> + isNew = 0) >> + while 1: > > Style/cosmetic: isNew could be a boolean and the while statement could say > 'while True'. This seems simple enough. added. > >> + lv = vgeditor.lvs[device.lvname] >> + vgeditor.editLogicalVolume(lv) >> + actions = vgeditor.convertToActions(); >> + >> + for action in actions: >> + # FIXME: handle exceptions >> + self.storage.devicetree.registerAction(action) >> + >> + if self.refresh(justRedraw=True): >> + actions.reverse() >> + for action in actions: >> + self.storage.devicetree.cancelAction(action) >> + >> + if self.refresh(): >> + raise RuntimeError, ("Returning partitions to state " >> + "prior to edit failed") >> + continue >> + else: >> + break >> + >> + vgeditor.destroy() >> >> def makeLvmCB(self, widget): >> if not getFormat("lvmpv").supported or not lvm.has_lvm(): >> > > - -- David Cantrell <dcantrell@xxxxxxxxxx> > Red Hat / Honolulu, HI > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkqy9HwACgkQ5hsjjIy1VkkohACffZA1aTwNtPS+a7y80QK0b957 > rWkAn3olRVEg18sXl1HVJz5v1uBrP4+B > =WXrm > -----END PGP SIGNATURE----- > > _______________________________________________ > Anaconda-devel-list mailing list > Anaconda-devel-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/anaconda-devel-list -- Joel Andres Granados Brno, Czech Republic, Red Hat.
Attachment:
pgpzYIMqFpEHN.pgp
Description: PGP signature
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list