connectors/PYRO/__init__.py
changeset 923 6ef6e0b3a908
parent 917 401e44bae7c0
child 969 1950fe687dde
--- 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)