[master 10/15] dispatch: fix remaining places using the old dispatch interface.

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

 



dispatch.skipStep("step", skip=0) is
dispatch.request_step("step") now and can not be unskipped again.

dispatch.stepInSkipList is dispatch.step_disabled and there's a function
for the inverse check: dispatch.step_enabled.
---
 anaconda                           |    2 +-
 pyanaconda/dispatch.py             |    4 ++--
 pyanaconda/gui.py                  |    2 +-
 pyanaconda/installclass.py         |    2 +-
 pyanaconda/iw/autopart_type.py     |    4 ++--
 pyanaconda/iw/task_gui.py          |    4 ++--
 pyanaconda/kickstart.py            |    2 +-
 pyanaconda/storage/__init__.py     |    2 +-
 pyanaconda/text.py                 |    2 +-
 pyanaconda/textw/partition_text.py |    2 +-
 pyanaconda/upgrade.py              |    4 ++--
 11 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/anaconda b/anaconda
index 16f5238..57d376f 100755
--- a/anaconda
+++ b/anaconda
@@ -751,7 +751,7 @@ if __name__ == "__main__":
     else:
         anaconda.instClass.setSteps(anaconda)
     if anaconda.rescue:
-        anaconda.dispatch.skipStep("rescue", skip=0)
+        anaconda.dispatch.request_step("rescue")
 
     image_count = 0
     for image in opts.images:
diff --git a/pyanaconda/dispatch.py b/pyanaconda/dispatch.py
index c2783c4..5b4ab9f 100644
--- a/pyanaconda/dispatch.py
+++ b/pyanaconda/dispatch.py
@@ -198,7 +198,7 @@ class Dispatcher(object):
 
     def go_back(self):
         """
-        The caller should make sure canGoBack() is True before calling this
+        The caller should make sure can_go_back() is True before calling this
         method.
         """
         self._setDir(DISPATCH_BACK)
@@ -268,7 +268,7 @@ class Dispatcher(object):
                 continue
             log.info("dispatch: moving (%d) to step %s" %
                      (self.dir, self.step))
-            if self.stepIsDirect(self.step):
+            if self.step_is_direct(self.step):
                 # handle a direct step by just calling the function
                 log.debug("dispatch: %s is a direct step" % self.step)
                 self.dir = self.steps[self.step].target(self.anaconda)
diff --git a/pyanaconda/gui.py b/pyanaconda/gui.py
index 00872c4..135bc50 100755
--- a/pyanaconda/gui.py
+++ b/pyanaconda/gui.py
@@ -1262,7 +1262,7 @@ class InstallControlWindow:
                     sys.exit(0)
 
         ics = InstallControlState (self)
-        ics.setPrevEnabled(self.anaconda.dispatch.canGoBack())
+        ics.setPrevEnabled(self.anaconda.dispatch.can_go_back())
         self.destroyCurrentWindow()
         self.currentWindow = newScreenClass(ics)
 
diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
index 70ed0fa..508f3b3 100644
--- a/pyanaconda/installclass.py
+++ b/pyanaconda/installclass.py
@@ -145,7 +145,7 @@ class BaseInstallClass(object):
 
         # upgrade will also always force looking for an upgrade.
         if flags.cmdline.has_key("upgrade"):
-            dispatch.skipStep("findrootparts", skip = 0)
+            dispatch.request_step("findrootparts")
 
         # allow interface backends to skip certain steps.
         map(lambda s: dispatch.skipStep(s), anaconda.intf.unsupported_steps())
diff --git a/pyanaconda/iw/autopart_type.py b/pyanaconda/iw/autopart_type.py
index 2ca0013..8a02f82 100644
--- a/pyanaconda/iw/autopart_type.py
+++ b/pyanaconda/iw/autopart_type.py
@@ -184,8 +184,8 @@ class PartitionTypeWindow(InstallWindow):
             elif self.buttonGroup.getCurrent() == "freespace":
                 self.storage.config.clearPartType = CLEARPART_TYPE_NONE
 
-            self.dispatch.skipStep("autopartitionexecute", skip = 0)
-            self.dispatch.skipStep("cleardiskssel", skip = 0)
+            self.dispatch.request_step("autopartitionexecute")
+            self.dispatch.request_step("cleardiskssel")
 
             if self.encryptButton.get_active():
                 self.storage.encryptedAutoPart = True
diff --git a/pyanaconda/iw/task_gui.py b/pyanaconda/iw/task_gui.py
index 74b4deb..6764dcf 100644
--- a/pyanaconda/iw/task_gui.py
+++ b/pyanaconda/iw/task_gui.py
@@ -505,7 +505,7 @@ class TaskWindow(InstallWindow):
             raise gui.StayOnScreen
 
         if self.xml.get_widget("customRadio").get_active():
-            self.dispatch.skipStep("group-selection", skip = 0)
+            self.dispatch.request_step("group-selection")
         else:
             self.dispatch.skipStep("group-selection")
 
@@ -691,7 +691,7 @@ class TaskWindow(InstallWindow):
             txt = lbl.get_text()
             lbl.set_text(txt %(productName,))
 
-        custom = not self.dispatch.stepInSkipList("group-selection")
+        custom = self.dispatch.step_enabled("group-selection")
         if custom:
             self.xml.get_widget("customRadio").set_active(True)
         else:
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 4e8515e..72af6e4 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1518,7 +1518,7 @@ def setSteps(anaconda):
         errors = []
 
         for (step, msg) in missingSteps:
-            if not dispatch.stepInSkipList(step):
+            if dispatch.step_enabled(step):
                 errors.append(msg)
 
         if len(errors) > 0:
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 209fbdc..9904581 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -1155,7 +1155,7 @@ class Storage(object):
             warnings.append(_("Installing on a FireWire device.  This may "
                               "or may not produce a working system."))
 
-        if self.platform and not self.anaconda.dispatch.stepInSkipList('instbootloader'):
+        if self.platform and self.anaconda.dispatch.step_enabled('instbootloader'):
             (e, w) = self.platform.checkBootRequest()
             errors.extend(e)
             warnings.extend(w)
diff --git a/pyanaconda/text.py b/pyanaconda/text.py
index 6f756f5..6396f25 100644
--- a/pyanaconda/text.py
+++ b/pyanaconda/text.py
@@ -537,7 +537,7 @@ class InstallInterface(InstallInterfaceBase):
             elif rc == INSTALL_NOOP:
                 return DISPATCH_DEFAULT
             elif rc == INSTALL_BACK:
-                if self.anaconda.dispatch.canGoBack():
+                if self.anaconda.dispatch.can_go_back():
                     return DISPATCH_BACK
                 else:
                     ButtonChoiceWindow(self.screen, _("Cancelled"),
diff --git a/pyanaconda/textw/partition_text.py b/pyanaconda/textw/partition_text.py
index 8d8b515..b1d9d74 100644
--- a/pyanaconda/textw/partition_text.py
+++ b/pyanaconda/textw/partition_text.py
@@ -143,7 +143,7 @@ class PartitionTypeWindow:
                 mustHaveSelectedDrive(anaconda.intf)
                 continue
 
-            anaconda.dispatch.skipStep("autopartitionexecute", skip = 0)
+            anaconda.dispatch.request_step("autopartitionexecute")
             anaconda.storage.doAutoPart = True
             anaconda.storage.config.clearPartType = partmethod_ans
             anaconda.storage.config.clearPartDisks = sel
diff --git a/pyanaconda/upgrade.py b/pyanaconda/upgrade.py
index 24309e3..30cdf6e 100644
--- a/pyanaconda/upgrade.py
+++ b/pyanaconda/upgrade.py
@@ -102,7 +102,7 @@ def findRootParts(anaconda):
     setUpgradeRoot(anaconda)
 
     if anaconda.rootParts is not None and len(anaconda.rootParts) > 0:
-        anaconda.dispatch.skipStep("findinstall", skip = 0)
+        anaconda.dispatch.request_step("findinstall")
     else:
         anaconda.dispatch.skipStep("findinstall")
 
@@ -118,7 +118,7 @@ def upgradeMigrateFind(anaconda):
     if not migents or len(migents) < 1:
         anaconda.dispatch.skipStep("upgrademigratefs")
     else:
-        anaconda.dispatch.skipStep("upgrademigratefs", skip = 0)
+        anaconda.dispatch.request_step("upgrademigratefs")
 
 def copyFromSysimage(rootPath, filename):
     """Mirrors filename from the sysimage on the ramdisk."""
-- 
1.7.3.3

_______________________________________________
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