diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-07-06 15:53:23 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-07-06 15:53:23 +0000 |
commit | e6544a4cf2e02415870e6aa0f60537e4895d8bb3 (patch) | |
tree | 02327c3eef070c1c58e04b7a7c8afab7a90a96e6 | |
parent | 8b6cbbd31b5c9eac5d16da6b2ee6eb4bae7a81b3 (diff) | |
download | anaconda-e6544a4cf2e02415870e6aa0f60537e4895d8bb3.tar.gz anaconda-e6544a4cf2e02415870e6aa0f60537e4895d8bb3.tar.xz anaconda-e6544a4cf2e02415870e6aa0f60537e4895d8bb3.zip |
fix bugs pychecker found...
-rw-r--r-- | bootloader.py | 14 | ||||
-rw-r--r-- | iw/bootloader_gui.py | 8 | ||||
-rw-r--r-- | iw/network_gui.py | 24 | ||||
-rw-r--r-- | partitioning.py | 2 | ||||
-rw-r--r-- | textw/bootdisk_text.py | 3 | ||||
-rw-r--r-- | textw/partition_text.py | 2 | ||||
-rw-r--r-- | textw/upgrade_text.py | 10 | ||||
-rw-r--r-- | textw/xconfig_text.py | 4 | ||||
-rw-r--r-- | upgrade.py | 4 |
9 files changed, 17 insertions, 54 deletions
diff --git a/bootloader.py b/bootloader.py index 3144f43d9..121a51490 100644 --- a/bootloader.py +++ b/bootloader.py @@ -203,7 +203,7 @@ class bootloaderInfo: (fsType, sl) = lilo.getImage(label) lilo.delImage(label) except IndexError: - sl = LiloConfigFile(imageType = "other", path = device) + sl = LiloConfigFile(imageType = "other", path = "/dev/%s" %(device)) sl.addEntry("optional") sl.addEntry("label", label) @@ -239,18 +239,6 @@ class bootloaderInfo: return lilo - lilo.write(instRoot + self.configfile, perms = self.perms) - - if not justConfigFile: - # throw away stdout, catch stderr - str = iutil.execWithCapture(instRoot + '/sbin/lilo' , - [ "lilo", "-r", instRoot ], - catchfd = 2, closefd = 1) - else: - str = "" - - return str - def write(self, instRoot, fsset, bl, langs, kernelList, chainList, defaultDev, justConfig): diff --git a/iw/bootloader_gui.py b/iw/bootloader_gui.py index 0fc760828..badf2f55a 100644 --- a/iw/bootloader_gui.py +++ b/iw/bootloader_gui.py @@ -66,6 +66,9 @@ class BootloaderWindow (InstallWindow): if widget.get_active(): self.bl.setDevice(device) + self.bl.setUseGrub(self.grub_radio.get_active()) + self.bl.args.set(self.appendEntry.get_text()) + default = None linuxDevice = None for index in range(self.numImages): @@ -83,9 +86,8 @@ class BootloaderWindow (InstallWindow): if not default: default = linuxDevice - self.bl.setUseGrub(self.grub_radio.get_active()) - self.bl.args.set(self.appendEntry.get_text()) self.bl.images.setDefault(default) + def typeName(self, type): if (type == "ext2"): @@ -310,7 +312,7 @@ class BootloaderWindow (InstallWindow): self.bootloader.set_active (FALSE) self.toggled (self.bootloader) - for n in (self.mbr, self.part, self.appendEntry, self.editBox, + for n in (self.appendEntry, self.editBox, self.imageList, self.liloLocationBox, self.radioBox ): n.set_sensitive (FALSE) diff --git a/iw/network_gui.py b/iw/network_gui.py index 1db31f9b2..9717486ec 100644 --- a/iw/network_gui.py +++ b/iw/network_gui.py @@ -58,9 +58,7 @@ class NetworkWindow (InstallWindow): domain = domain + "." + token count = count + 1 - self.domainname.set_text (domain) - -# self.hostname.set_text (self.network.hostname) + self.hostname.set_text (self.network.hostname) if ip.calcNMHandler != None: ip.disconnect (ip.calcNMHandler) @@ -94,26 +92,6 @@ class NetworkWindow (InstallWindow): except: pass - # not currently used - def setupTODO (self): - if self.devs: - if self.DHCPcb.get_active (): - self.dev.set (("bootproto", "dhcp")) - self.dev.unset ("ipaddr", "netmask", "network", "broadcast") - else: - try: - network, broadcast = inet_calcNetBroad (self.ip.get_text (), self.nm.get_text ()) - self.dev.set (("bootproto", "static")) - self.dev.set (("ipaddr", self.ip.get_text ()), ("netmask", self.nm.get_text ()), - ("network", network), ("broadcast", broadcast), ("onboot", "yes")) - self.network.gateway = self.gw.get_text () - self.network.primaryNS = self.dns1.get_text () - except: - pass - - self.dev.set (("onboot", "yes")) - - def calcNWBC (self, widget, (dev, ip, nm, nw, bc)): for addr in (ip, nm): dots = 0 diff --git a/partitioning.py b/partitioning.py index 6aedf92d5..edbfa65b0 100644 --- a/partitioning.py +++ b/partitioning.py @@ -104,8 +104,6 @@ def getDeviceSizeMB(dev): return (float(dev.heads * dev.cylinders * dev.sectors) / (1024 * 1024) * dev.sector_size) - return partition.geom.length * partition.geom.disk.dev.sector_size / 1024.0 / 1024.0 - def get_partition_by_name(disks, partname): for diskname in disks.keys(): disk = disks[diskname] diff --git a/textw/bootdisk_text.py b/textw/bootdisk_text.py index f4639c709..13abb2e9e 100644 --- a/textw/bootdisk_text.py +++ b/textw/bootdisk_text.py @@ -25,7 +25,8 @@ class BootDiskWindow: "Would you like to create a boot disk for your system?") if iutil.getArch () == "sparc": - floppy = todo.silo.hasUsableFloppy() + # XXX this went the way of the dodo... +# floppy = todo.silo.hasUsableFloppy() if floppy == 0: todo.bootdisk = 0 return INSTALL_NOOP diff --git a/textw/partition_text.py b/textw/partition_text.py index 4fb47fa2a..5543ad5e9 100644 --- a/textw/partition_text.py +++ b/textw/partition_text.py @@ -176,7 +176,7 @@ class PartitionWindow: def fstypeSetCB(self, obj): (listbox, entry) = obj - self.fstypeSet(listbox.current(), entry) + self.fstypeSet((listbox.current(), entry)) # make the entry for the mount point and it's label def makeMountEntry(self, request): diff --git a/textw/upgrade_text.py b/textw/upgrade_text.py index 45bb71992..9fac87bd1 100644 --- a/textw/upgrade_text.py +++ b/textw/upgrade_text.py @@ -4,6 +4,7 @@ import string import isys import iutil from log import log +from flags import flags from constants_text import * import upgrade @@ -98,10 +99,9 @@ class UpgradeSwapWindow: "and 2000 MB in size.")) else: screen.popWindow() - if todo.setupFilesystems: + if flags.setupFilesystems: # XXX fix me - return INSTALL_OK - upgrade.createSwapFile(todo.instPath, todo.fstab, + # upgrade.createSwapFile(todo.instPath, todo.fstab, mnt, val) return INSTALL_OK @@ -183,9 +183,9 @@ class CustomizeUpgradeWindow: return INSTALL_BACK if rc == string.lower (_("No")): - indiv.set (0) + dispatch.skipStep("indivpackage") else: - indiv.set (1) + dispatch.skipStep("indivpackage", skip = 0) return INSTALL_OK diff --git a/textw/xconfig_text.py b/textw/xconfig_text.py index 94e307978..044ef2d38 100644 --- a/textw/xconfig_text.py +++ b/textw/xconfig_text.py @@ -37,10 +37,6 @@ class XCustomWindow: if button != TEXT_CANCEL_CHECK: self.selectedRes = self.available_res[result] - def resetCB(self, screen): - self.selectedRes = self.origRes - self.selectedDepth = self.origDepth - def testCB(self, screen): newmodes = {} newmodes[self.selectedDepth] = [] diff --git a/upgrade.py b/upgrade.py index 12c1dd110..f5dd50253 100644 --- a/upgrade.py +++ b/upgrade.py @@ -196,7 +196,7 @@ def upgradeMountFilesystems(intf, rootInfo, oldfsset, instPath): badLinks = [] for n in checkLinks: if not os.path.islink(instPath + n): continue - l = os.readlink(self.instPath + n) + l = os.readlink(instPath + n) if l[0] == '/': badLinks.append(n) @@ -251,7 +251,7 @@ def upgradeFindPackages (intf, method, id, instPath): intf.messageWindow(_("Error"), _("Rebuild of RPM database failed. " "You may be out of disk space?")) - if files.setupFilesystems: + if flags.setupFilesystems: fsset.umountFilesystems (instPath) sys.exit(0) |