- Remove unnecessary semi colons in various places - textw/upgrade_text.py: add a few missing imports - Fix various missplaced doc strings - Fix several double imports - Fix AnacondaKSScript.run: Module 'os' has no 'exists' member - parseKickstart() replace use of undefined stdoutLog with print - users.py: Remove double definition of Users.setRootPassword - yuminstall.py: correct typo reop -> repo - yuminstall.py: _run: anaconda -> self.anaconda --- errors.py | 6 +++--- gui.py | 1 - image.py | 2 +- installclasses/fedora.py | 2 +- instdata.py | 4 ++-- isys/isys.py | 3 +-- kickstart.py | 7 +++---- network.py | 2 +- syslogd.py | 4 ++-- textw/upgrade_text.py | 4 ++++ users.py | 3 --- yuminstall.py | 4 ++-- 12 files changed, 20 insertions(+), 22 deletions(-) diff --git a/errors.py b/errors.py index e7bc3ce..9733733 100644 --- a/errors.py +++ b/errors.py @@ -27,7 +27,7 @@ import string import os from constants import lvmErrorOutput -"""Exceptions for use in lvm operations.""" +# Exceptions for use in lvm operations. class LvmError(Exception): """An error occurred with lvm.""" @@ -123,7 +123,7 @@ class PVCreateError(LvmError): return "pvcreate of pv \"%s\" failed\nLog:\n%s" % ( \ self.pvname, self.log) -"""Exceptions for use in partitioning.""" +# Exceptions for use in partitioning. class PartitioningError(Exception): """A critical error which must be resolved to continue the installation.""" @@ -149,7 +149,7 @@ class LabelError(Exception): def __str__(self): return self.message -"""Exceptions for use in package selection.""" +# Exceptions for use in package selection. class NoSuchGroup(Exception): def __init__ (self, value): diff --git a/gui.py b/gui.py index ea83c08..96cc1d4 100755 --- a/gui.py +++ b/gui.py @@ -38,7 +38,6 @@ import shutil import gtk import gtk.glade import gobject -import gettext from language import expandLangs from constants import * from product import * diff --git a/image.py b/image.py index 8ae0970..e15de12 100644 --- a/image.py +++ b/image.py @@ -179,7 +179,7 @@ def mountImage(isodir, tree, discnum, messageWindow, discImages={}): try: isoImage = "%s/%s" % (isodir, discImages[discnum]) isys.losetup("/dev/loop1", isoImage, readOnly = 1) - isys.mount("/dev/loop1", tree, fstype = 'iso9660', readOnly = True); + isys.mount("/dev/loop1", tree, fstype = 'iso9660', readOnly = True) break except: ans = messageWindow(_("Missing ISO 9660 Image"), diff --git a/installclasses/fedora.py b/installclasses/fedora.py index c314339..23d174b 100644 --- a/installclasses/fedora.py +++ b/installclasses/fedora.py @@ -84,7 +84,7 @@ class InstallClass(BaseInstallClass): map(lambda x: anaconda.backend.selectGroup(x), ["core"]) def setSteps(self, anaconda): - BaseInstallClass.setSteps(self, anaconda); + BaseInstallClass.setSteps(self, anaconda) anaconda.dispatch.skipStep("partition") def getBackend(self): diff --git a/instdata.py b/instdata.py index c8fac77..035edbc 100644 --- a/instdata.py +++ b/instdata.py @@ -208,9 +208,9 @@ class InstallData: f.write("#version=%s\n" % versionToString(DEVEL)) if self.upgrade: - f.write("upgrade\n"); + f.write("upgrade\n") else: - f.write("install\n"); + f.write("install\n") m = None diff --git a/isys/isys.py b/isys/isys.py index 4fd0b93..8fa8cb9 100755 --- a/isys/isys.py +++ b/isys/isys.py @@ -41,7 +41,6 @@ import selinux import logging log = logging.getLogger("anaconda") -import warnings NM_SERVICE = "org.freedesktop.NetworkManager" NM_MANAGER_PATH = "/org/freedesktop/NetworkManager" @@ -387,7 +386,7 @@ def ext2IsDirty(device): return label def ext2HasJournal(device): - hasjournal = _isys.e2hasjournal(device); + hasjournal = _isys.e2hasjournal(device) return hasjournal def modulesWithPaths(): diff --git a/kickstart.py b/kickstart.py index e3db519..7665686 100644 --- a/kickstart.py +++ b/kickstart.py @@ -59,7 +59,6 @@ from anaconda_log import logger, logLevelMap, setHandlersLevel class AnacondaKSScript(Script): def run(self, chroot, serial, intf = None): - import tempfile import os.path if self.inChroot: @@ -83,7 +82,7 @@ class AnacondaKSScript(Script): messages = self.logfile d = os.path.basename(messages) - if not os.exists(d): + if not os.path.exists(d): os.makedirs(d) else: messages = "%s.log" % path @@ -1192,10 +1191,10 @@ def parseKickstart(anaconda, file): try: file = preprocessKickstart(file) except KickstartError, msg: - stdoutLog.critical(_("Error processing %%ksappend lines: %s") % msg) + print _("Error processing %%ksappend lines: %s") % msg sys.exit(1) except Exception, e: - stdoutLog.critical(_("Unknown error processing %%ksappend lines: %s") % e) + print _("Unknown error processing %%ksappend lines: %s") % e sys.exit(1) handler = AnacondaKSHandler(anaconda) diff --git a/network.py b/network.py index 24538e3..4192c3e 100644 --- a/network.py +++ b/network.py @@ -501,7 +501,7 @@ class Network: self.hostname != "localhost.localdomain"): f.write(" --hostname %s" % self.hostname) - f.write("\n"); + f.write("\n") def hasNameServers(self, hash): if hash.keys() == []: diff --git a/syslogd.py b/syslogd.py index 267b7fd..38e47cb 100644 --- a/syslogd.py +++ b/syslogd.py @@ -61,12 +61,12 @@ class Syslogd: fd.close() def __init__(self, root = "", output = sys.stdout, socket = "/dev/log"): - filename = root + socket; + filename = root + socket self.goSyslog(output, filename) class InstSyslog: def __init__ (self): - self.pid = -1; + self.pid = -1 def start (self, root, log): # don't run in the "install from livecd" case diff --git a/textw/upgrade_text.py b/textw/upgrade_text.py index f944c72..4de534e 100644 --- a/textw/upgrade_text.py +++ b/textw/upgrade_text.py @@ -24,10 +24,14 @@ from constants_text import * from snack import * from flags import flags from constants import * +from storage.formats import getFormat import gettext _ = lambda x: gettext.ldgettext("anaconda", x) +import logging +log = logging.getLogger("anaconda") + class UpgradeMigrateFSWindow: def __call__ (self, screen, anaconda): diff --git a/users.py b/users.py index 015b588..8ac20ac 100644 --- a/users.py +++ b/users.py @@ -206,9 +206,6 @@ class Users: else: return False - def setRootPassword(self, password, isCrypted, lock, algo=None): - rootUser = self.admin.lookupUserByName("root") - def checkUserExists(self, username, root="/mnt/sysimage"): childpid = os.fork() diff --git a/yuminstall.py b/yuminstall.py index de61974..e51d1b8 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -731,7 +731,7 @@ class AnacondaYum(YumSorter): if m.group(4): repo.proxy = m.group(3) + m.group(4) else: - reop.proxy = m.group(3) + repo.proxy = m.group(3) if m and m.group(5): repo.proxy_username = m.group(5) @@ -986,7 +986,7 @@ class AnacondaYum(YumSorter): spaceprob = to_unicode(spaceprob) fileprob = to_unicode(fileprob) - if len(self.anaconda.backend.getRequiredMedia()) > 1 or anaconda.id.upgrade: + if len(self.anaconda.backend.getRequiredMedia()) > 1 or self.anaconda.id.upgrade: intf.detailedMessageWindow(_("Error Running Transaction"), msg, spaceprob + "\n" + fileprob, type="custom", custom_icon="error", custom_buttons=[_("_Exit installer")]) -- 1.6.5.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list