summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2012-08-10 11:32:29 +0200
committerMartin Sivak <msivak@redhat.com>2012-08-10 11:32:29 +0200
commit85a905071fa5dfd9b0de4f79958b479d14e7722a (patch)
tree949474b38603e8e4d5e27a03ee8426c496826265
parent14bc68a2cb479bbfaea68484337cec47209670f2 (diff)
downloadanaconda-85a905071fa5dfd9b0de4f79958b479d14e7722a.tar.gz
anaconda-85a905071fa5dfd9b0de4f79958b479d14e7722a.tar.xz
anaconda-85a905071fa5dfd9b0de4f79958b479d14e7722a.zip
Fix naming for data attribute and move the NormalSpoke.__init__ under the proper class
-rw-r--r--pyanaconda/ui/common.py37
-rw-r--r--pyanaconda/ui/tui/spokes/__init__.py6
-rw-r--r--pyanaconda/ui/tui/spokes/password.py4
-rw-r--r--pyanaconda/ui/tui/spokes/time.py4
4 files changed, 26 insertions, 25 deletions
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py
index 58b4b956e..8f6c4b7b4 100644
--- a/pyanaconda/ui/common.py
+++ b/pyanaconda/ui/common.py
@@ -125,7 +125,7 @@ class Spoke(UIObject):
in the anaconda class, as that would be a big mess. Instead, a
Spoke may count on the following:
- ksdata -- An instance of a pykickstart Handler object. The
+ data -- An instance of a pykickstart Handler object. The
Spoke uses this to populate its UI with defaults
and to pass results back after it has run.
storage -- An instance of storage.Storage. This is useful for
@@ -200,6 +200,23 @@ class Spoke(UIObject):
class NormalSpoke(Spoke):
priority = 100
+ """A NormalSpoke is a Spoke subclass that is displayed when the user
+ selects something on a Hub. This is what most Spokes in anaconda will
+ be based on.
+
+ From a layout perspective, a NormalSpoke takes up the entire screen
+ therefore hiding the Hub and its action area. The NormalSpoke also
+ provides some basic navigation information (where you are, what you're
+ installing, how to get back to the Hub) at the top of the screen.
+ """
+ def __init__(self, data, storage, payload, instclass):
+ """Create a NormalSpoke instance."""
+ if self.__class__ is NormalSpoke:
+ raise TypeError("NormalSpoke is an abstract class")
+
+ Spoke.__init__(self, data, storage, payload, instclass)
+ self.selector = None
+
@property
def indirect(self):
"""If this property returns True, then this spoke is considered indirect.
@@ -266,22 +283,6 @@ class StandaloneSpoke(NormalSpoke):
Spoke.__init__(self, data, storage, payload, instclass)
- """A NormalSpoke is a Spoke subclass that is displayed when the user
- selects something on a Hub. This is what most Spokes in anaconda will
- be based on.
-
- From a layout perspective, a NormalSpoke takes up the entire screen
- therefore hiding the Hub and its action area. The NormalSpoke also
- provides some basic navigation information (where you are, what you're
- installing, how to get back to the Hub) at the top of the screen.
- """
- def __init__(self, data, storage, payload, instclass):
- """Create a NormalSpoke instance."""
- if self.__class__ is NormalSpoke:
- raise TypeError("NormalSpoke is an abstract class")
-
- Spoke.__init__(self, data, storage, payload, instclass)
- self.selector = None
class PersonalizationSpoke(Spoke):
@@ -331,7 +332,7 @@ class Hub(UIObject):
in the anaconda class, as that would be a big mess. Instead, a
Hub may count on the following:
- ksdata -- An instance of a pykickstart Handler object. The
+ data -- An instance of a pykickstart Handler object. The
Hub uses this to populate its UI with defaults
and to pass results back after it has run.
storage -- An instance of storage.Storage. This is useful for
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 34299d309..ea857277a 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -41,10 +41,10 @@ class TUISpoke(TUIObject, tui.Widget, Spoke):
title = u"Default spoke title"
category = u""
- def __init__(self, app, ksdata, storage, payload, instclass):
- TUIObject.__init__(self, app, ksdata)
+ def __init__(self, app, data, storage, payload, instclass):
+ TUIObject.__init__(self, app, data)
tui.Widget.__init__(self)
- Spoke.__init__(self, ksdata, storage, payload, instclass)
+ Spoke.__init__(self, data, storage, payload, instclass)
@property
def status(self):
diff --git a/pyanaconda/ui/tui/spokes/password.py b/pyanaconda/ui/tui/spokes/password.py
index 99ab3b941..b3ca75741 100644
--- a/pyanaconda/ui/tui/spokes/password.py
+++ b/pyanaconda/ui/tui/spokes/password.py
@@ -6,8 +6,8 @@ class PasswordSpoke(NormalTUISpoke):
title = _("Set root password")
category = "password"
- def __init__(self, app, ksdata, storage, payload, instclass):
- NormalTUISpoke.__init__(self, app, ksdata, storage, payload, instclass)
+ def __init__(self, app, data, storage, payload, instclass):
+ NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
self._password = None
@property
diff --git a/pyanaconda/ui/tui/spokes/time.py b/pyanaconda/ui/tui/spokes/time.py
index 667a9e7ae..6cf5104f0 100644
--- a/pyanaconda/ui/tui/spokes/time.py
+++ b/pyanaconda/ui/tui/spokes/time.py
@@ -6,8 +6,8 @@ class TimeZoneSpoke(NormalTUISpoke):
title = "Timezone settings"
category = "localization"
- def __init__(self, app, ksdata, storage, payload, instclass):
- NormalTUISpoke.__init__(self, app, ksdata, storage, payload, instclass)
+ def __init__(self, app, data, storage, payload, instclass):
+ NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
def initialize(self):
self._timezones = dict([(k, sorted(v)) for k,v in localization.get_all_regions_and_timezones().iteritems()])