diff options
author | Chris Morley <chrisinnanaimo@hotmail.com> | 2014-04-02 20:29:33 -0700 |
---|---|---|
committer | Chris Morley <chrisinnanaimo@hotmail.com> | 2014-04-02 20:29:33 -0700 |
commit | 7c104b5086e66021f722c89da508528cbbc1000c (patch) | |
tree | de09dd1f3090ec38231a854521465ca1e442db1e | |
parent | ee13cceccb71302c13cff69c285929ce4c40f738 (diff) | |
download | linuxcnc-7c104b5086e66021f722c89da508528cbbc1000c.tar.gz linuxcnc-7c104b5086e66021f722c89da508528cbbc1000c.zip |
stepconf -catch realtime check error if no kernal version.
put a try statement around check_for_rt.
When 2.6 is merged with UB3 this rt_check would always cause an error
and fail due to no kernel version available.
-rwxr-xr-x | src/emc/usr_intf/stepconf/stepconf.py | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/emc/usr_intf/stepconf/stepconf.py b/src/emc/usr_intf/stepconf/stepconf.py index 63783d8aa..e055df53c 100755 --- a/src/emc/usr_intf/stepconf/stepconf.py +++ b/src/emc/usr_intf/stepconf/stepconf.py @@ -714,20 +714,24 @@ class StepconfApp: # check for realtime kernel def check_for_rt(self): - actual_kernel = os.uname()[2] - if hal.is_sim : - self.warning_dialog(self._p.MESS_NO_REALTIME,True) - if debug: - return True + try: + actual_kernel = os.uname()[2] + if hal.is_sim : + self.warning_dialog(self._p.MESS_NO_REALTIME,True) + if debug: + return True + else: + return False + elif hal.is_rt and not hal.kernel_version == actual_kernel: + self.warning_dialog(self._p.MESS_KERNAL_WRONG + '%s'%hal.kernel_version,True) + if debug: + return True + else: + return False else: - return False - elif hal.is_rt and not hal.kernel_version == actual_kernel: - self.warning_dialog(self._p.MESS_KERNAL_WRONG + '%s'%hal.kernel_version,True) - if debug: return True - else: - return False - else: + except: + print 'STEPCONF WARNING: check-for-realtime function failed - continuing anyways.' return True # pop up dialog |