Fix problems when configure mountpoint:

1. focus on no item and press "Edit" button ,errors occur.
2. configure root mountpoint ok and and just press Enter when the focus
   on no button, errors occur.

	modified:   text/ri_main.py
	modified:   text/ri_newt.py
This commit is contained in:
Peng Zhihui
2014-06-16 14:46:10 +08:00
parent f8624a8ba9
commit 2f80cd90f0
2 changed files with 11 additions and 6 deletions

View File

@@ -54,11 +54,13 @@ while True :
elif list[count] == 'information':
ri_newt.Prepar_installation()
s = ri_newt.Screen.dict[list[count]].set_data()
if int(s) == 0:
count = count + 1
else:
count = count - 1
try:
if int(s) == 0:
count = count + 1
else:
count = count - 1
except:
pass
if count < 0 or count > len(list) - 1:
ri_newt.Screen.screen.finish()

View File

@@ -620,7 +620,10 @@ class MountPoint(Screen):
s = Screen.yesno(self.title, 1, 6, 'TextboxReflowed', 'CListbox', 'eLabel', 'ButtonBar')
if s == 0:
self.set_mountpoint(Screen.clistbox.current())
try:
self.set_mountpoint(Screen.clistbox.current())
except:
pass
# edit mountpoint
elif s == -1:
break