From b5d5e541922dc0ba78020eca31572fe19094b221 Mon Sep 17 00:00:00 2001 From: "Michael D. M. Dryden" Date: Thu, 24 Mar 2016 16:10:56 -0400 Subject: [PATCH] Fixed bug preventing separation of different scans. --- dstat_interface/dstat_comm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dstat_interface/dstat_comm.py b/dstat_interface/dstat_comm.py index f18fbe0..4667581 100644 --- a/dstat_interface/dstat_comm.py +++ b/dstat_interface/dstat_comm.py @@ -439,11 +439,14 @@ class Experiment(object): data = self.data_handler( (scan, self.serial.read(size=self.databytes))) self.data_pipe.send(data) - elif line.startswith('S'): - self.scan += 1 + + elif line.lstrip().startswith('S'): + scan += 1 + elif line.lstrip().startswith("#"): _logger.error("".join( ("DSTAT: ",line.lstrip().rstrip())), "INFO") + elif line.lstrip().startswith("no"): _logger.error("".join( ("DSTAT: ",line.lstrip().rstrip())), "DBG") -- GitLab