summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xanaconda11
-rwxr-xr-xgui.py2
-rw-r--r--text.py33
3 files changed, 26 insertions, 20 deletions
diff --git a/anaconda b/anaconda
index e11f4c6b2..8a3c5f5b3 100755
--- a/anaconda
+++ b/anaconda
@@ -46,11 +46,14 @@ if (mode == 'g' and not os.environ.has_key('DISPLAY')):
sys.exit(0)
if (mode == 'g'):
- import gui
- gui.run()
+ from gui import InstallMethod
elif (mode == 't'):
- import text
- text.run()
+ from text import InstallMethod
else:
print "No mode was specified"
+ sys.exit(1)
+
+method = InstallInterface()
+method.run()
+
diff --git a/gui.py b/gui.py
index 70f04451c..314f27711 100755
--- a/gui.py
+++ b/gui.py
@@ -125,7 +125,7 @@ class PartitionWindow:
window.destroy()
return self.rc
-class InstallMethod:
+class InstallInterface:
def run(self):
rc_parse("gtkrc")
diff --git a/text.py b/text.py
index 01f3c3351..ef9aa1aa3 100644
--- a/text.py
+++ b/text.py
@@ -1,21 +1,24 @@
import _balkan
from snack import *
+import rpm
-screen = SnackScreen()
+class InstallInterface:
+ def run(self):
+ screen = SnackScreen()
-device = 'hda';
-table = _balkan.readTable('/dev/' + device)
-partList = []
-for i in range(0, len(table) - 1):
- (type, start, size) = table[i]
- if (type == 0x83 and size):
- fullName = '/dev/%s%d' % (device, i + 1)
- partList.append((fullName, fullName))
-
-rc = ListboxChoiceWindow(screen, 'Root Partition', 'What partition would you '
- 'like to use for your root partition?', partList,
- buttons = ['Ok'])
+ device = 'hda';
+ table = _balkan.readTable('/dev/' + device)
+ partList = []
+ for i in range(0, len(table) - 1):
+ (type, start, size) = table[i]
+ if (type == 0x83 and size):
+ fullName = '/dev/%s%d' % (device, i + 1)
+ partList.append((fullName, fullName))
+
+ rc = ListboxChoiceWindow(screen, 'Root Partition', 'What partition would you '
+ 'like to use for your root partition?', partList,
+ buttons = ['Ok'])
-screen.finish()
+ screen.finish()
-print rc
+ print rc