--- gui.py | 22 +++++++++++----------- iw/task_gui.py | 6 +++--- packages.py | 2 +- text.py | 23 ++++++++++++----------- yuminstall.py | 14 +++++++------- 5 files changed, 34 insertions(+), 33 deletions(-) diff --git a/gui.py b/gui.py index a4bd75c..7f56036 100755 --- a/gui.py +++ b/gui.py @@ -998,11 +998,11 @@ class InstallInterface: def resume(self): pass - def enableNetwork(self, anaconda): - if len(anaconda.id.network.netdevices) == 0: + def enableNetwork(self): + if len(self.anaconda.id.network.netdevices) == 0: return False from netconfig_dialog import NetworkConfigurator - net = NetworkConfigurator(anaconda.id.network) + net = NetworkConfigurator(self.anaconda.id.network) ret = net.run() net.destroy() @@ -1035,21 +1035,21 @@ class InstallInterface: custom_buttons, custom_icon, run=True, parent=parent).getrc() return rc - def createRepoWindow(self, anaconda): + def createRepoWindow(self): from task_gui import RepoCreator - dialog = RepoCreator(anaconda) + dialog = RepoCreator(self.anaconda) dialog.createDialog() dialog.run() - def editRepoWindow(self, anaconda, repoObj): + def editRepoWindow(self, repoObj): from task_gui import RepoEditor - dialog = RepoEditor(anaconda, repoObj) + dialog = RepoEditor(self.anaconda, repoObj) dialog.createDialog() dialog.run() - def methodstrRepoWindow(self, anaconda): + def methodstrRepoWindow(self): from task_gui import RepoMethodstrEditor - dialog = RepoMethodstrEditor(anaconda) + dialog = RepoMethodstrEditor(self.anaconda) dialog.createDialog() return dialog.run() @@ -1096,8 +1096,8 @@ class InstallInterface: custom_buttons=[_("_Exit installer")]).getrc() return rc - def getInstallKey(self, anaconda, key = ""): - d = InstallKeyWindow(anaconda, key) + def getInstallKey(self, key = ""): + d = InstallKeyWindow(self.anaconda, key) rc = d.run() if rc == gtk.RESPONSE_CANCEL: ret = None diff --git a/iw/task_gui.py b/iw/task_gui.py index a91209a..9dd044d 100644 --- a/iw/task_gui.py +++ b/iw/task_gui.py @@ -488,7 +488,7 @@ class TaskWindow(InstallWindow): return if repo.needsNetwork() and not network.hasActiveNetDev(): - if not self.anaconda.intf.enableNetwork(self.anaconda): + if not self.anaconda.intf.enableNetwork(): return gtk.RESPONSE_CANCEL dialog = RepoEditor(self.anaconda, repo) @@ -504,7 +504,7 @@ class TaskWindow(InstallWindow): return gtk.RESPONSE_CANCEL if dialog.repo.needsNetwork() and not network.hasActiveNetDev(): - if not self.anaconda.intf.enableNetwork(self.anaconda): + if not self.anaconda.intf.enableNetwork(): return gtk.RESPONSE_CANCEL s = self.xml.get_widget("repoList").get_model() @@ -536,7 +536,7 @@ class TaskWindow(InstallWindow): if not wasChecked: if repo.needsNetwork() and not network.hasActiveNetDev(): - if not self.anaconda.intf.enableNetwork(self.anaconda): + if not self.anaconda.intf.enableNetwork(): return repo.enable() diff --git a/packages.py b/packages.py index 4e90b7c..dda98c4 100644 --- a/packages.py +++ b/packages.py @@ -366,7 +366,7 @@ def regKeyScreen(anaconda): anaconda.id.instClass.skipkey = False while not anaconda.id.instClass.skipkey: - rc = anaconda.intf.getInstallKey(anaconda, key) + rc = anaconda.intf.getInstallKey(key) if rc is None and anaconda.dispatch.canGoBack(): return DISPATCH_BACK elif rc is None: diff --git a/text.py b/text.py index fada4e2..7077be8 100644 --- a/text.py +++ b/text.py @@ -480,11 +480,11 @@ class InstallInterface: return self.messageWindow(title, text, type, default, custom_icon, custom_buttons) - def createRepoWindow(self, anaconda): + def createRepoWindow(self): self.messageWindow(_("Error"), _("Repository editing is not available in text mode.")) - def editRepoWindow(self, anaconda, repoObj): + def editRepoWindow(self, repoObj): self.messageWindow(_("Error"), _("Repository editing is not available in text mode.")) @@ -509,16 +509,16 @@ class InstallInterface: w.pop() return (passphrase, isglobal) - def enableNetwork(self, anaconda): - if len(anaconda.id.network.netdevices) == 0: + def enableNetwork(self): + if len(self.anaconda.id.network.netdevices) == 0: return False from netconfig_text import NetworkConfiguratorText - w = NetworkConfiguratorText(self.screen, anaconda) + w = NetworkConfiguratorText(self.screen, self.anaconda) ret = w.run() return ret != INSTALL_BACK - def getInstallKey(self, anaconda, key = ""): - ic = anaconda.id.instClass + def getInstallKey(self, key = ""): + ic = self.anaconda.id.instClass keyname = _(ic.instkeyname) if keyname is None: keyname = _("Installation Key") @@ -532,7 +532,7 @@ class InstallInterface: radio = RadioGroup() - keyradio = radio.add(keyname, "key", int(not anaconda.id.instClass.skipkey)) + keyradio = radio.add(keyname, "key", int(not self.anaconda.id.instClass.skipkey)) keyentry = Entry(24) keyentry.set(key) @@ -545,7 +545,7 @@ class InstallInterface: if ic.allowinstkeyskip: skipradio = radio.add(_("Skip entering %(instkey)s") % {"instkey": keyname}, "skip", - int(anaconda.id.instClass.skipkey)) + int(self.anaconda.id.instClass.skipkey)) g.add(skipradio, 0, 2) bb = ButtonBar(self.screen, [ TEXT_OK_BUTTON, TEXT_BACK_BUTTON ]) @@ -577,8 +577,8 @@ class InstallInterface: exnWin = MainExceptionWindow(shortText, longTextFile, self.screen) return exnWin - def saveExceptionWindow(self, anaconda, longTextFile): - win = SaveExceptionWindow (anaconda, longTextFile, self.screen) + def saveExceptionWindow(self, longTextFile): + win = SaveExceptionWindow (self.anaconda, longTextFile, self.screen) return win def waitWindow(self, title, text): @@ -631,6 +631,7 @@ class InstallInterface: return True def run(self, anaconda): + self.anaconda = anaconda instLang = anaconda.id.instLanguage if instLang.getFontFile(instLang.getCurrent()) == "none": diff --git a/yuminstall.py b/yuminstall.py index b13e443..6876463 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -288,7 +288,7 @@ class AnacondaYum(YumSorter): "installation repository:\n\n%s\n\nPlease provide the " "correct information for installing %s.") % (e, productName)) - self.anaconda.methodstr = self.anaconda.intf.methodstrRepoWindow(anaconda) + self.anaconda.methodstr = self.anaconda.intf.methodstrRepoWindow() self.doConfigSetup(root=anaconda.rootPath) self.conf.installonlypkgs = [] @@ -406,7 +406,7 @@ class AnacondaYum(YumSorter): # Calling _switchImage takes care of mounting /mnt/isodir first. if not network.hasActiveNetDev(): - if not self.anaconda.intf.enableNetwork(self.anaconda): + if not self.anaconda.intf.enableNetwork(): self._baseRepoURL = None return @@ -416,7 +416,7 @@ class AnacondaYum(YumSorter): self._baseRepoURL = m elif m.startswith("nfs:"): if not network.hasActiveNetDev(): - if not self.anaconda.intf.enableNetwork(self.anaconda): + if not self.anaconda.intf.enableNetwork(): self._baseRepoURL = None isys.mount(m[4:], self.tree, "nfs") @@ -680,7 +680,7 @@ class AnacondaYum(YumSorter): pkgFile = to_unicode(os.path.basename(package.remote_path)) if package.repo.needsNetwork() and not network.hasActiveNetDev(): - if not self.anaconda.intf.enableNetwork(self.anaconda): + if not self.anaconda.intf.enableNetwork(): return rc = self.anaconda.intf.messageWindow(_("Error"), @@ -1043,7 +1043,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon # know this in advance. if len(filter(lambda r: r.needsNetwork(), self.ayum.repos.listEnabled())) > 0 and \ not network.hasActiveNetDev(): - if not anaconda.intf.enableNetwork(anaconda): + if not anaconda.intf.enableNetwork(): anaconda.intf.messageWindow(_("No Network Available"), _("Some of your software repositories require " "networking, but there was an error enabling the " @@ -1128,7 +1128,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon except RepoError, e: waitwin.pop() if repo.needsNetwork() and not network.hasActiveNetDev(): - if anaconda.intf.enableNetwork(anaconda): + if anaconda.intf.enableNetwork(): repo.mirrorlistparsed = False continue @@ -1156,7 +1156,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon sys.exit(0) elif rc == 1: # edit - anaconda.intf.editRepoWindow(anaconda, repo) + anaconda.intf.editRepoWindow(repo) elif rc == 2: # retry, but only if button is present continue -- 1.6.1.3 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list