[PATCH 07/10] Fix issues in the AnacondaWidgets python wrapper

David Shea dshea at redhat.com
Wed Sep 25 18:21:51 UTC 2013


Switch to absolute module names for importing the gi data. Besides
breaking the pylint check, using relative imports meant that
AnacondaWidgets.py could only be used when installed.

Add an __init__ for AnacondaWidgets.TimezoneMap
---
 widgets/python/AnacondaWidgets.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/widgets/python/AnacondaWidgets.py b/widgets/python/AnacondaWidgets.py
index 9b268a5..512eb5e 100644
--- a/widgets/python/AnacondaWidgets.py
+++ b/widgets/python/AnacondaWidgets.py
@@ -24,8 +24,8 @@ where necessary.  For instance instead of creating a class and then
 setting a bunch of properties, these classes allow passing the properties
 at creation time.
 """
-from ..importer import modules
-from ..overrides import override
+from gi.importer import modules
+from gi.overrides import override
 
 Anaconda = modules['AnacondaWidgets']._introspection_module
 __all__ = []
@@ -78,6 +78,9 @@ DiskOverview = override(DiskOverview)
 __all__.append('DiskOverview')
 
 class TimezoneMap(Anaconda.TimezoneMap):
+    def __init__(self):
+        Anaconda.TimezoneMap.__init__(self)
+
     def set_timezone(self, timezone, no_signal=False):
         Anaconda.TimezoneMap.set_timezone(self, timezone, no_signal)
 
-- 
1.8.3.1



More information about the anaconda-patches mailing list