diff -r 078bf153fb8c -r 0f905e027d18 runtime/PLCObject.py --- a/runtime/PLCObject.py Mon Apr 15 00:36:41 2013 +0200 +++ b/runtime/PLCObject.py Wed Apr 17 10:54:17 2013 +0900 @@ -196,6 +196,9 @@ self._GetLogMessage.argtypes = [ctypes.c_uint8, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)] self._loading_error = None + + self.PythonRuntimeInit() + return True except: self._loading_error = traceback.format_exc() @@ -402,11 +405,8 @@ if self.LoadPLC(): self.PLCStatus = "Stopped" - try: - self.PythonRuntimeInit() - except: - self.PLCStatus = "Broken" else: + self.PLCStatus = "Broken" self._FreePLC() self.StatusChange()