diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-01-12 22:50:24 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-01-14 10:46:27 +0100 |
commit | df71485041f40c5a2833900d6fae2bddefa52dd1 (patch) | |
tree | 5c266614b3eb81e5de572bb1f107e72fabef21e7 | |
parent | 8e52cd10af2e6881db8ad567cfdbea1fe9388acc (diff) | |
download | anaconda-df71485041f40c5a2833900d6fae2bddefa52dd1.tar.gz anaconda-df71485041f40c5a2833900d6fae2bddefa52dd1.tar.xz anaconda-df71485041f40c5a2833900d6fae2bddefa52dd1.zip |
Fixup various errors detected by pylint
I've been running pylint on a subset of anaconda:
booty storage iw/*.py platform.py
And it has found various errors this commit fixes:
- Restore line accidently dropped from iscsi.py
- execWithPulseProgress should propagate the return value of
execWithCallback
- storage.formats.fs:535 (FS.doCheck): self.intf should be just intf
- storage.formats.fs: add missing "import sys" (for sys.exit)
- advanced_config.py add missing import for NetworkConfigurator
- lvm_dialog_gui.py: VolumeGroupEditor.editLogicalVolume dev was renamed to d
- partition_gui.py: remove an unneeded semicolon
- partition_gui.py: PartitionWindow.createCB rc should be dialog_rc
- storage.FSSet.write: put docstring in the proper place
- platform.Sparc.minimumSector: sectors should be sector
-rw-r--r-- | iutil.py | 2 | ||||
-rw-r--r-- | iw/advanced_storage.py | 1 | ||||
-rw-r--r-- | iw/lvm_dialog_gui.py | 2 | ||||
-rw-r--r-- | iw/partition_gui.py | 4 | ||||
-rw-r--r-- | platform.py | 2 | ||||
-rw-r--r-- | storage/__init__.py | 2 | ||||
-rw-r--r-- | storage/formats/fs.py | 7 | ||||
-rw-r--r-- | storage/iscsi.py | 1 |
8 files changed, 12 insertions, 9 deletions
@@ -351,7 +351,7 @@ def _pulseProgressCallback(data, callback_data=None): def execWithPulseProgress(command, argv, stdin = None, stdout = None, stderr = None, echo = True, progress = None, root = '/'): - execWithCallback(command, argv, stdin=stdin, stdout=stdout, + return execWithCallback(command, argv, stdin=stdin, stdout=stdout, stderr=stderr, echo=echo, callback=_pulseProgressCallback, callback_data=progress, root=root) diff --git a/iw/advanced_storage.py b/iw/advanced_storage.py index 22ddff7fa..f7d5a0777 100644 --- a/iw/advanced_storage.py +++ b/iw/advanced_storage.py @@ -27,6 +27,7 @@ import iutil import network import storage.fcoe import storage.iscsi +from netconfig_dialog import NetworkConfigurator def addFcoeDrive(anaconda): (dxml, dialog) = gui.getGladeWidget("fcoe-config.glade", "fcoeDialog") diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py index a93a64690..44cd840cb 100644 --- a/iw/lvm_dialog_gui.py +++ b/iw/lvm_dialog_gui.py @@ -645,7 +645,7 @@ class VolumeGroupEditor: if (d.type != "lvmlv" or d.vg.id != self.vg.id) and \ mp == mountpoint and \ not (isinstance(d, LUKSDevice) and - full_name in [d.name for d in dev.parents]): + full_name in [dev.name for dev in d.parents]): used = True break diff --git a/iw/partition_gui.py b/iw/partition_gui.py index f3f0ff9b8..094ada072 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -1507,7 +1507,7 @@ class PartitionWindow(InstallWindow): # in the back when we pop up other screens. if dialog_rc != 1: log.error("I received a dialog_rc != 1 (%d) witch should not " - "happen" % rc) + "happen" % dialog_rc) self.dialog.destroy() return @@ -1771,7 +1771,7 @@ class PartitionWindow(InstallWindow): while True: vgeditor.editLogicalVolume(lv, isNew = isNew) - actions = vgeditor.convertToActions(); + actions = vgeditor.convertToActions() for action in actions: # FIXME: handle exceptions diff --git a/platform.py b/platform.py index d5c1e685d..2a841e879 100644 --- a/platform.py +++ b/platform.py @@ -465,7 +465,7 @@ class Sparc(Platform): @property def minimumSector(self, disk): - (cylinders, heads, sector) = disk.device.biosGeometry + (cylinders, heads, sectors) = disk.device.biosGeometry start = long(sectors * heads) start /= long(1024 / disk.device.sectorSize) return start+1 diff --git a/storage/__init__.py b/storage/__init__.py index 7e5418975..3b3f6d672 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -2013,10 +2013,10 @@ class FSSet(object): return migratable def write(self, instPath=None): + """ write out all config files based on the set of filesystems """ if not instPath: instPath = self.rootpath - """ write out all config files based on the set of filesystems """ # /etc/fstab fstab_path = os.path.normpath("%s/etc/fstab" % instPath) fstab = self.fstab() diff --git a/storage/formats/fs.py b/storage/formats/fs.py index 614c9d334..5c64b0928 100644 --- a/storage/formats/fs.py +++ b/storage/formats/fs.py @@ -29,6 +29,7 @@ """ import math import os +import sys import tempfile import selinux import isys @@ -532,9 +533,9 @@ class FS(DeviceFormat): "interactively. Restart installation after you " "have corrected the problems on the filesystem.") - self.intf.messageWindow(_("Unrecoverable Error"), - hdr + "\n\n" + msg + "\n\n" + help, - custom_icon='error') + intf.messageWindow(_("Unrecoverable Error"), + hdr + "\n\n" + msg + "\n\n" + help, + custom_icon='error') sys.exit(0) else: raise FSError(hdr + msg) diff --git a/storage/iscsi.py b/storage/iscsi.py index 1499fd495..68c2c9d53 100644 --- a/storage/iscsi.py +++ b/storage/iscsi.py @@ -283,6 +283,7 @@ class iscsi(object): return # set iscsi nodes to autostart + root = anaconda.id.storage.rootDevice for node in self.nodes: autostart = True disks = self.getNodeDisks(node, anaconda.id.storage) |