summaryrefslogtreecommitdiffstats
path: root/pyanaconda/ui/__init__.py
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2012-08-10 11:25:24 +0200
committerMartin Sivak <msivak@redhat.com>2012-08-10 11:25:24 +0200
commit14bc68a2cb479bbfaea68484337cec47209670f2 (patch)
treec6a10ba1cb77ec83f7096b472c7d7d669dcfdd52 /pyanaconda/ui/__init__.py
parent588727d523f87a16b2b987d64950d5394dc67d1b (diff)
downloadanaconda-14bc68a2cb479bbfaea68484337cec47209670f2.tar.gz
anaconda-14bc68a2cb479bbfaea68484337cec47209670f2.tar.xz
anaconda-14bc68a2cb479bbfaea68484337cec47209670f2.zip
Improve documentation and add licensing headers
Diffstat (limited to 'pyanaconda/ui/__init__.py')
-rw-r--r--pyanaconda/ui/__init__.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/pyanaconda/ui/__init__.py b/pyanaconda/ui/__init__.py
index 7e9e31b27..4cf5f5e16 100644
--- a/pyanaconda/ui/__init__.py
+++ b/pyanaconda/ui/__init__.py
@@ -98,7 +98,26 @@ class UserInterface(object):
"""
raise NotImplementedError
- def getActionClasses(module_pattern, path, hubs, standalone_class):
+ def getActionClasses(self, module_pattern, path, hubs, standalone_class):
+ """Collect all the Hub and Spoke classes which should be enqueued for
+ processing and order them according to their pre/post dependencies.
+
+ :param module_pattern: the full name pattern (pyanaconda.ui.gui.spokes.%s)
+ of modules we about to import from path
+ :type module_pattern: string
+
+ :param path: the directory we are picking up modules from
+ :type path: string
+
+ :param hubs: the list of Hub classes we check to be in pre/postForHub
+ attribute of Spokes to pick up
+ :type hubs: common.Hub based types
+
+ :param standalone_class: the parent type of Spokes we want to pick up
+ :type standalone_class: common.StandaloneSpoke based types
+ """
+
+
standalones = collect(module_pattern, path, lambda obj: issubclass(obj, standalone_class) and \
getattr(obj, "preForHub", False) or getattr(obj, "postForHub", False))
@@ -123,4 +142,3 @@ class UserInterface(object):
def saveExceptionWindow(self, account_manager, signature):
"""Show a window that provides a way to report a bug."""
raise NotImplementedError
-