--- a/ProjectController.py Sun Feb 03 16:21:56 2013 +1100
+++ b/ProjectController.py Tue Feb 05 23:28:35 2013 +1100
@@ -1110,8 +1110,10 @@
def UpdateMethodsFromPLCStatus(self):
if self._connector is not None:
- status, log_count = self._connector.GetPLCstatus()
- self.UpdatePLCLog(log_count)
+ PLCstatus = self._connector.GetPLCstatus() + if PLCstatus is not None: + status, log_count = PLCstatus + self.UpdatePLCLog(log_count) --- a/connectors/PYRO/__init__.py Sun Feb 03 16:21:56 2013 +1100
+++ b/connectors/PYRO/__init__.py Tue Feb 05 23:28:35 2013 +1100
@@ -88,7 +88,7 @@
# Check connection is effective.
# lambda is for getattr of GetPLCstatus to happen inside catcher
- if PyroCatcher(lambda:RemotePLCObjectProxy.GetPLCstatus())() == None:
+ if PyroCatcher(lambda:RemotePLCObjectProxy.GetPLCstatus())() is None: confnodesroot.logger.write_error(_("Cannot get PLC status - connection failed.\n"))
@@ -144,7 +144,7 @@
def _PyroGetPLCstatus(self):
return RemotePLCObjectProxy.GetPLCstatus()
- GetPLCstatus = PyroCatcher(_PyroGetPLCstatus, ("Broken",-1))
+ GetPLCstatus = PyroCatcher(_PyroGetPLCstatus, ("Broken",None)) def _PyroRemoteExec(self, script, **kwargs):
return RemotePLCObjectProxy.RemoteExec(script, **kwargs)
--- a/targets/plc_debug.c Sun Feb 03 16:21:56 2013 +1100
+++ b/targets/plc_debug.c Tue Feb 05 23:28:35 2013 +1100
@@ -310,7 +310,7 @@
#define LOG_BUFFER_SIZE (1<<14) /*16Ko*/
#define LOG_BUFFER_MASK (LOG_BUFFER_SIZE-1)