# HG changeset patch
# User Laurent Bessard
# Date 1363827976 -3600
# Node ID b2fb188c9bfffad981bd416c09c32f970a24c329
# Parent  961cf0f80c250259a7d32bc57fd5f1b88b74b4d7
Fixed bug when GET_LOGCOUNTSTransaction return None

diff -r 961cf0f80c25 -r b2fb188c9bff LPCconnector/LPCAppObject.py
--- a/LPCconnector/LPCAppObject.py	Thu Mar 21 09:29:46 2013 +0900
+++ b/LPCconnector/LPCAppObject.py	Thu Mar 21 02:06:16 2013 +0100
@@ -46,7 +46,7 @@
 
     def GetPLCstatus(self):
         strcounts = self.HandleSerialTransaction(GET_LOGCOUNTSTransaction())
-        if len(strcounts) == LogLevelsCount * 4:
+        if strcounts is not None and len(strcounts) == LogLevelsCount * 4:
             cstrcounts = ctypes.create_string_buffer(strcounts)
             ccounts = ctypes.cast(cstrcounts, ctypes.POINTER(ctypes.c_uint32))
             counts = [int(ccounts[idx]) for idx in xrange(LogLevelsCount)]