[PATCH 3/4] Add dumb enableNetwork implementation to GraphicalIntf

Vratislav Podzimek vpodzime at redhat.com
Tue Jan 15 13:32:13 UTC 2013


enableNetwork is not implemented in the abstract class for user
interface. Not implementing it in any way in the GraphicalIntf class
may result in traceback.

Also inherit AbstractSaveExceptionWindow from the object class.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 meh/ui/__init__.py | 2 +-
 meh/ui/gui.py      | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/meh/ui/__init__.py b/meh/ui/__init__.py
index 295c133..8c174e1 100644
--- a/meh/ui/__init__.py
+++ b/meh/ui/__init__.py
@@ -158,7 +158,7 @@ class AbstractMessageWindow(object):
         """
         raise NotImplementedError
 
-class AbstractSaveExceptionWindow:
+class AbstractSaveExceptionWindow(object):
     """This abstract class describes the basic level of support required of
        any interface that supplies an exception saving window.  The exception
        saving window is the dialog displayed if the user clicks "save" on the
diff --git a/meh/ui/gui.py b/meh/ui/gui.py
index b6ee678..ab6f56a 100644
--- a/meh/ui/gui.py
+++ b/meh/ui/gui.py
@@ -37,6 +37,11 @@ class GraphicalIntf(AbstractIntf):
     def __init__(self, *args, **kwargs):
         AbstractIntf.__init__(self, *args, **kwargs)
 
+    def enableNetwork(self, *args, **kwargs):
+        """Should be provided by the inheriting class."""
+
+        return False
+
     def exitWindow(self, title, message, *args, **kwargs):
         win = ExitWindow(title, message, *args, **kwargs)
         win.run()
-- 
1.7.11.7



More information about the anaconda-patches mailing list