[PATCH jk-tui 6/6] Enable text mode once again!

Jesse Keating jkeating at redhat.com
Tue Aug 14 22:02:13 UTC 2012


---
 pyanaconda/__init__.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/__init__.py b/pyanaconda/__init__.py
index bcfcddc..7162928 100644
--- a/pyanaconda/__init__.py
+++ b/pyanaconda/__init__.py
@@ -223,11 +223,16 @@ class Anaconda(object):
         if self._intf:
             raise RuntimeError, "Second attempt to initialize the InstallInterface"
 
-        if self.displayMode != 'g':
-            raise RuntimeError("Due to UI rewrite in progress, only graphical installs are supported")
-
-        from pyanaconda.ui.gui import GraphicalUserInterface
-        self._intf = GraphicalUserInterface(self.storage, self.payload, self.instClass)
+        if self.displayMode == 'g':
+            from pyanaconda.ui.gui import GraphicalUserInterface
+            self._intf = GraphicalUserInterface(self.storage, self.payload,
+                                                self.instClass)
+        elif self.displayMode in ['t', 'c']: # text and command line are the same
+            from pyanaconda.ui.tui import TextUserInterface
+            self._intf = TextUserInterface(self.storage, self.payload,
+                                           self.instClass)
+        else:
+            raise RuntimeError("Unsupported displayMode: %s" % self.displayMode)
 
     def writeXdriver(self, root = None):
         # this should go away at some point, but until it does, we
-- 
1.7.11.2



More information about the anaconda-patches mailing list