From a2fe0983c29a577e33b4da4de5082436918fdeb0 Mon Sep 17 00:00:00 2001 From: Sven Gestegard Robertz <sven.robertz@cs.lth.se> Date: Thu, 2 Jul 2015 11:47:45 +0200 Subject: [PATCH] changed python runOne to decode until a sample is found --- lib/python/labcomm2014/LabComm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/python/labcomm2014/LabComm.py b/lib/python/labcomm2014/LabComm.py index 9898127..20f49eb 100644 --- a/lib/python/labcomm2014/LabComm.py +++ b/lib/python/labcomm2014/LabComm.py @@ -909,15 +909,17 @@ class Decoder(Codec): def runOne(self): data,decl = self.decode() + # decode any signatures until next sample + while data == None: + data,decl = self.decode() if decl: - if data: + if data != None: if str(decl) in self.handlers: handler = self.handlers[str(decl)] handler(data) else: print ("No handler for %s" % decl.name ) - def decode(self): while True: index = self.decode_type_number() -- GitLab