--- iw/netconfig_dialog.py | 1 - iw/partition_gui.py | 10 +--------- iw/partition_ui_helpers_gui.py | 28 ++++++++++++++-------------- 3 files changed, 15 insertions(+), 24 deletions(-)
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py index c87da21..3941d3a 100644 --- a/iw/netconfig_dialog.py +++ b/iw/netconfig_dialog.py @@ -27,7 +27,6 @@ from constants import * import gettext _ = lambda x: gettext.ldgettext("anaconda", x)
-import gui import network import isys
diff --git a/iw/partition_gui.py b/iw/partition_gui.py index 3f7aa95..24559ee 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -129,13 +129,6 @@ class DiskStripeSlice: return "cornsilk2" return "cornsilk1"
- def hideOrShowText(self): - return - if self.box.get_bounds()[2] < self.text.get_bounds()[2]: - self.text.hide() - else: - self.text.show() - def sliceText(self): if self.partition.type & parted.PARTITION_EXTENDED: return "" @@ -178,7 +171,6 @@ class DiskStripeSlice: fill_color='black', anchor=gtk.ANCHOR_NW, clip=True, clip_width=xlength-1, clip_height=yheight-1) - self.hideOrShowText()
def __init__(self, parent, partition, treeView, editCB): self.text = None @@ -483,8 +475,8 @@ class DiskTreeModel(gtk.TreeStore): # not found the partition raise RuntimeError, "could not find partition"
- """ Return the device representing the current selection """ def getCurrentDevice(self): + """ Return the device representing the current selection """ selection = self.view.get_selection() model, iter = selection.get_selected() if not iter: diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py index ede0200..0ad1803 100644 --- a/iw/partition_ui_helpers_gui.py +++ b/iw/partition_ui_helpers_gui.py @@ -280,22 +280,22 @@ def formatMigrateOptionCB(widget, data): setMntPtComboStateFromType(ofstype, mntptcombo)
-""" createPreExistFSOptionSection: given inputs for a preexisting partition, - create a section that will provide format and migrate options - - Returns the value of row after packing into the maintable, - and a dictionary consistenting of: - formatcb - checkbutton for 'format as new fs' - fstype - part of format fstype menu - fstypeMenu - part of format fstype menu - migratecb - checkbutton for migrate fs - migfstypeMenu - menu for migrate fs types - lukscb - checkbutton for 'encrypt using LUKS/dm-crypt' - resizecb - checkbutton for 'resize fs' - resizesb - spinbutton with resize target -""" def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, partitions, ignorefs=[], luksdev=None): + """ createPreExistFSOptionSection: given inputs for a preexisting partition, + create a section that will provide format and migrate options + + Returns the value of row after packing into the maintable, + and a dictionary consistenting of: + formatcb - checkbutton for 'format as new fs' + fstype - part of format fstype menu + fstypeMenu - part of format fstype menu + migratecb - checkbutton for migrate fs + migfstypeMenu - menu for migrate fs types + lukscb - checkbutton for 'encrypt using LUKS/dm-crypt' + resizecb - checkbutton for 'resize fs' + resizesb - spinbutton with resize target + """ rc = {}
if luksdev:
--- storage/devices.py | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/storage/devices.py b/storage/devices.py index e6190fe..845a46b 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -1681,7 +1681,7 @@ class LVMVolumeGroupDevice(DMDevice): try: lvm.vgreduce(self.name, [], rm=True) lvm.vgremove(self.name) - except lvm.LVMErorr: + except lvm.LVMError: raise DeviceError("Could not completely remove VG %s" % self.name) finally: self.notifyKernel() @@ -1738,12 +1738,12 @@ class LVMVolumeGroupDevice(DMDevice): self.parents.remove(pv) pv.removeChild()
- """ We can't rely on lvm to tell us about our size, free space, &c - since we could have modifications queued, unless the VG and all of - its PVs already exist. + # We can't rely on lvm to tell us about our size, free space, &c + # since we could have modifications queued, unless the VG and all of + # its PVs already exist. + # + # -- liblvm may contain support for in-memory devices
- -- liblvm may contain support for in-memory devices - """ @property def isModified(self): """ Return True if the VG has changes queued that LVM is unaware of. """ @@ -2035,10 +2035,8 @@ class MDRaidArrayDevice(StorageDevice): self._memberDevices = numeric_type(memberDevices) self.sysfsPath = "/devices/virtual/block/%s" % name
- """ FIXME: Bitmap is more complicated than this. - - It can be internal or external. External requires a filename. - """ + # FIXME: Bitmap is more complicated than this. + # It can be internal or external. External requires a filename. self.bitmap = bitmap
self.formatClass = get_device_format_class("mdmember") @@ -2234,8 +2232,8 @@ class MDRaidArrayDevice(StorageDevice): """ Return True if the array is running in degraded mode. """ rc = False degraded_file = "/sys/%s/md/degraded" % self.sysfsPath - if os.access(state_file, os.R_OK): - val = open(state_file).read().strip() + if os.access(degraded_file, os.R_OK): + val = open(degraded_file).read().strip() log.debug("%s degraded is %s" % (self.name, val)) if val == "1": rc = True
anaconda-devel@lists.stg.fedoraproject.org