diff options
author | Hans de Goede <hdegoede@redhat.com> | 2008-11-06 09:48:57 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2008-11-06 09:48:57 +0100 |
commit | 4a66d6ef1b2bb8e523285541fcd91ebdb3fbac38 (patch) | |
tree | 12bf058dfcec1c0011bb8021cbc54f5f511d14a2 | |
parent | ed30b77c7f89280f77fade970b7e29b0179c7317 (diff) | |
download | anaconda-4a66d6ef1b2bb8e523285541fcd91ebdb3fbac38.tar.gz anaconda-4a66d6ef1b2bb8e523285541fcd91ebdb3fbac38.tar.xz anaconda-4a66d6ef1b2bb8e523285541fcd91ebdb3fbac38.zip |
Fix all trivial (1 liner fixes) errors found by pychecker (#469730)
This patch fixes the following trivial (1 liner fixes) errors found by
pychecker:
dmraid.py:262: No global (rs) found
gui.py:803: No global (errnum) found
gui.py:803: No global (msg) found
installclasses/workstation.py:30: Invalid arguments to (setGroupSelection), got 3, expected 2
installclasses/workstation.py:30: No global (intf) found
iscsi.py:294: No global (login) found
iw/netconfig_dialog.py:225: No global (log) found
iw/release_notes.py:132: No global (link) found
rescue.py:234: No global (time) found
text.py:280: No class attribute (passphraseentry) found
text.py:281: No class attribute (confirmentry) found
textw/grpselect_text.py:58: No class attribute (group) found
textw/network_text.py:487: Using is not , may not always work
textw/network_text.py:487: Using is not , may not always work
textw/partition_text.py:1280: No global (lvname) found
yuminstall.py:573: Variable (ksrepo) used before being set
-rw-r--r-- | dmraid.py | 2 | ||||
-rwxr-xr-x | gui.py | 2 | ||||
-rw-r--r-- | installclasses/workstation.py | 2 | ||||
-rw-r--r-- | iscsi.py | 2 | ||||
-rw-r--r-- | iw/netconfig_dialog.py | 3 | ||||
-rw-r--r-- | iw/release_notes.py | 2 | ||||
-rw-r--r-- | rescue.py | 1 | ||||
-rw-r--r-- | text.py | 4 | ||||
-rw-r--r-- | textw/grpselect_text.py | 2 | ||||
-rw-r--r-- | textw/network_text.py | 2 | ||||
-rw-r--r-- | textw/partition_text.py | 2 | ||||
-rw-r--r-- | yuminstall.py | 2 |
12 files changed, 15 insertions, 11 deletions
@@ -259,7 +259,7 @@ def scanForMPath(drives): return reduce(lambda x,y: x + [updateName(y),], mpaths, []) def renameMPath(mpath, name): - cacheDrives.rename(rs, name) + cacheDrives.rename(mpath, name) def startMPath(mpath): if flags.mpath == 0: @@ -800,7 +800,7 @@ class ExceptionWindow: textbuf.insert(iter, line) exnView.set_buffer(textbuf) - except IOError (errnum, msg): + except IOError, (errnum, msg): log.error("Could not read %s, skipping: %s" % (longTracebackFile, msg)) vbox.remove(expander) else: diff --git a/installclasses/workstation.py b/installclasses/workstation.py index c2b541b26..22f626edf 100644 --- a/installclasses/workstation.py +++ b/installclasses/workstation.py @@ -27,7 +27,7 @@ class InstallClass(personal_desktop.InstallClass): hidden = 1 def setGroupSelection(self, anaconda): - personal_desktop.InstallClass.setGroupSelection(self, anaconda.backend, intf) + personal_desktop.InstallClass.setGroupSelection(self, anaconda.backend) anaconda.backend.selectGroup("emacs") anaconda.backend.selectGroup("gnome-software-development") anaconda.backend.selectGroup("x-software-development") @@ -291,7 +291,7 @@ class iscsi(object): for pidstr in psout.split(): pid = string.atoi(pidstr) - login.info("killing %s %d" % (ISCSID, pid)) + log.info("killing %s %d" % (ISCSID, pid)) os.kill(pid, signal.SIGKILL) diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py index a3f162643..09f16debb 100644 --- a/iw/netconfig_dialog.py +++ b/iw/netconfig_dialog.py @@ -22,6 +22,9 @@ from rhpl.translate import _, N_ import gui import network import isys +import logging + +log = logging.getLogger("anaconda") class NetworkConfigurator: def __init__(self, network): diff --git a/iw/release_notes.py b/iw/release_notes.py index 6731deb22..ca7d87c60 100644 --- a/iw/release_notes.py +++ b/iw/release_notes.py @@ -129,7 +129,7 @@ class ReleaseNotesViewer: try: f = self.openURI(uri) except OSError: - self.log("Failed to open %s" % (link,)) + self.log("Failed to open %s" % (uri,)) return if f is not None: @@ -27,6 +27,7 @@ import fsset import shutil import fcntl import termios +import time from rhpl.translate import _ @@ -277,8 +277,8 @@ class LuksPassphraseWindow: continue else: passphrase = self.passphrase - self.passphraseentry.set(self.passphrase) - self.confirmentry.set(self.passphrase) + passphraseentry.set(self.passphrase) + confirmentry.set(self.passphrase) retrofit = False if self.preexist: diff --git a/textw/grpselect_text.py b/textw/grpselect_text.py index f5ba02ead..18f958741 100644 --- a/textw/grpselect_text.py +++ b/textw/grpselect_text.py @@ -55,7 +55,7 @@ class GroupSelectionWindow: pkgs = self.ayum.pkgSack.returnNewestByName(pkg) except yum.Errors.PackageSackError: log.debug("no such package %s from group %s" % - (pkg, self.group.groupid)) + (pkg, grpid)) if pkgs: pkgs = self.ayum.bestPackagesFromList(pkgs) for po in pkgs: diff --git a/textw/network_text.py b/textw/network_text.py index 76efc3992..e3b84c070 100644 --- a/textw/network_text.py +++ b/textw/network_text.py @@ -484,7 +484,7 @@ class NetworkDeviceWindow: continue # set the manual IPv6 address/prefix - if prefix is not '': + if prefix != '': addr = "%s/%s" % (ip, prefix,) else: addr = "%s" % (ip,) diff --git a/textw/partition_text.py b/textw/partition_text.py index 1ce982ab7..723af70de 100644 --- a/textw/partition_text.py +++ b/textw/partition_text.py @@ -1277,7 +1277,7 @@ class PartitionWindow: self.intf.messageWindow(_("Illegal logical volume name"), _("The logical volume name \"%s\" " "is already in use. Please " - "pick another.") % (lvname,), + "pick another.") % (lvn,), custom_icon="error") continue diff --git a/yuminstall.py b/yuminstall.py index 068d4524e..d864c1422 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -570,7 +570,7 @@ class AnacondaYum(YumSorter): self.repos.add(repo) log.info("added repository %s with source URL %s" % (repo.name, repo.baseurl)) except yum.Errors.DuplicateRepoError, e: - log.warning("ignoring duplicate repository %s with source URL %s" % (ksrepo.name, ksrepo.baseurl or ksrepo.mirrorlist)) + log.warning("ignoring duplicate repository %s with source URL %s" % (repo.name, repo.baseurl or repo.mirrorlist)) if self.anaconda.isKickstart: for ksrepo in self.anaconda.id.ksdata.repoList: |