modified: ri_cmd.py

modified:   ri_data.py
	modified:   ri_tk.py
	modified:   ri_tk_cmd.py
	modified:   ri_widget.py
    add network check ip and hostname funcation
This commit is contained in:
fling
2010-12-09 09:17:52 +08:00
parent e332f9de9c
commit d8d7bb036d
5 changed files with 23 additions and 34 deletions

View File

@@ -4,8 +4,6 @@
import ri_widget
import os
import ri_tk
from ri_data import Network
from ri_tk_cmd import network_quit as network_update
def quit():
''' correspond to quit button '''
@@ -30,30 +28,15 @@ def previous():
def next():
''' correspond to next button '''
q, t = ri_widget.Sequence.current()
if not check_date(t):
return
wid_name = ri_widget.Sequence.next()
if wid_name is not None:
ri_widget.Widget.dict[t].hide()
ri_widget.Widget.dict[t].hide(t)
ri_widget.Widget.dict[wid_name].show()
else:
code = ri_widget.MessageBox.dict["next"].show()
if code == True:
os.execl('/usr/bin/python','python','ri_install.py', "-d","tk","-l",ri_tk.language)
def check_date(operate):
'''check date '''
if operate == "network" :
network_update()
if not Network.hostname:
ri_widget.MessageBox.dict['check_ip_hostname'].show()
return False
if Network.configuration == "static" and not Network.check_ip() :
ri_widget.MessageBox.dict['check_ip_hostname'].show()
return False
return True
from ri_tk_cmd import *