--- 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"))
return None
@@ -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)