merge
authored
Fri, 04 Jun 2010 17:36:11 +0200
changeset 564 464d470bdbd7
parent 563 c74a37d156df (current diff)
parent 562 2c8f08f4f874 (diff)
child 565 7b64350c1dd8
merge
connectors/LPC/LPCAppObject.py
--- a/connectors/LPC/LPCAppObject.py	Fri Jun 04 16:11:19 2010 +0200
+++ b/connectors/LPC/LPCAppObject.py	Fri Jun 04 17:36:11 2010 +0200
@@ -32,7 +32,7 @@
                                          115200, #speed
                                          2)      #timeout
         self.HandleSerialTransaction(IDLETransaction())
-        
+
     def StartPLC(self, debug=False):
         self.HandleSerialTransaction(STARTTransaction())
             
@@ -50,7 +50,9 @@
 
     def MatchMD5(self, MD5):
         data = self.HandleSerialTransaction(GET_PLCIDTransaction())
-        return data[:32] == MD5
+        if data is not None:
+            return data[:32] == MD5
+        return False
 
     class IEC_STRING(ctypes.Structure):
         """