[PATCH 12/14] Fix methodstr editing dialog.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to pass dummy repo object. Also pass methodstr as argument.
---
 gui.py         |    4 ++--
 iw/task_gui.py |    9 +++++++--
 yuminstall.py  |    2 +-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gui.py b/gui.py
index c83ff8c..77f9fce 100755
--- a/gui.py
+++ b/gui.py
@@ -1044,9 +1044,9 @@ class InstallInterface:
         dialog.createDialog()
         dialog.run()
 
-    def methodstrRepoWindow(self):
+    def methodstrRepoWindow(self, methodstr):
         from task_gui import RepoMethodstrEditor
-        dialog = RepoMethodstrEditor(self.anaconda)
+        dialog = RepoMethodstrEditor(self.anaconda, methodstr)
         dialog.createDialog()
         return dialog.run()
 
diff --git a/iw/task_gui.py b/iw/task_gui.py
index 12d9a45..7cbc074 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -395,8 +395,13 @@ class RepoEditor:
         return rc
 
 class RepoMethodstrEditor(RepoEditor):
-    def __init__(self, anaconda):
-        RepoEditor.__init__(self, anaconda, None)
+    def __init__(self, anaconda, methodstr):
+        # Create temporary repo to store methodstr needed for
+        # createDialog parent method.
+        temprepo = AnacondaYumRepo("UITmpMethodstrRepo")
+        temprepo.name = "Installation Repo"
+        temprepo.anacondabaseurls = [methodstr]
+        RepoEditor.__init__(self, anaconda, temprepo)
 
     def createDialog(self):
         RepoEditor.createDialog(self)
diff --git a/yuminstall.py b/yuminstall.py
index 4fd4954..944436b 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -318,7 +318,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()
+                self.anaconda.methodstr = self.anaconda.intf.methodstrRepoWindow(self.anaconda.methodstr or "cdrom:")
 
         self.doConfigSetup(root=anaconda.rootPath)
         self.conf.installonlypkgs = []
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux