# HG changeset patch # User Edouard Tisserant # Date 1366163657 -32400 # Node ID 0f905e027d186d21778307b7ad10647a325e99e0 # Parent 078bf153fb8c869cad895d63cc1430acfa26216d Better mdns resolution failure signaling, added fixed bug whith runtime autostart diff -r 078bf153fb8c -r 0f905e027d18 connectors/PYRO/__init__.py --- a/connectors/PYRO/__init__.py Mon Apr 15 00:36:41 2013 +0200 +++ b/connectors/PYRO/__init__.py Wed Apr 17 10:54:17 2013 +0900 @@ -45,6 +45,7 @@ from util.Zeroconf import Zeroconf r = Zeroconf() i=r.getServiceInfo(service_type, location) + if i is None : raise Exception, "'%s' not found"%location ip = str(socket.inet_ntoa(i.getAddress())) port = str(i.getPort()) newlocation = ip+':'+port 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()