diff options
author | Erik Troan <ewt@redhat.com> | 1999-04-29 19:15:22 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-04-29 19:15:22 +0000 |
commit | 35d9f9b2058f6fe2f623bc58f3cf0081b5b599d9 (patch) | |
tree | 9798f744156c08951f52f9c55cf2627ff6c8cdd5 | |
parent | d6d2cdaa7615a2c6cbed7d7c8778e845236dbcb1 (diff) | |
download | anaconda-35d9f9b2058f6fe2f623bc58f3cf0081b5b599d9.tar.gz anaconda-35d9f9b2058f6fe2f623bc58f3cf0081b5b599d9.tar.xz anaconda-35d9f9b2058f6fe2f623bc58f3cf0081b5b599d9.zip |
use InstlalInterface class
-rwxr-xr-x | anaconda | 11 | ||||
-rwxr-xr-x | gui.py | 2 | ||||
-rw-r--r-- | text.py | 33 |
3 files changed, 26 insertions, 20 deletions
@@ -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() + @@ -125,7 +125,7 @@ class PartitionWindow: window.destroy() return self.rc -class InstallMethod: +class InstallInterface: def run(self): rc_parse("gtkrc") @@ -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 |