From 9ce4cf7ff9dbd2317c38f76302edd755bb013f9a Mon Sep 17 00:00:00 2001
From: Daniel Brown <ddb@star.sr.bham.ac.uk>
Date: Thu, 18 Sep 2014 15:36:37 +0100
Subject: [PATCH] Adding check for lines starting with '**' when parsing
 finesse stdout/stderr

---
 pykat/finesse.py | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/pykat/finesse.py b/pykat/finesse.py
index 71f8b9a..95675af 100644
--- a/pykat/finesse.py
+++ b/pykat/finesse.py
@@ -886,18 +886,16 @@ class kat(object):
                 
                 if len(line) > 0:
                     
-                    if line.rstrip().endswith('s'):
-                        # FIXME: hack to fix bug with 'Global scaling factor' message
-                        if line.rstrip().endswith('ts'):
-                            # do nothing
-                            if self.verbose: sys.stdout.write(line)
-                        else:
-                            vals = line.split("-")
-                            action = vals[0].strip()
-                            prc = vals[1].strip()[:]
-                        
-                            if printerr == 1:
-                                sys.stdout.write("\r{0} {1}".format(action, prc))
+                    if line.lstrip().startswith('**'):
+                        if self.verbose: sys.stdout.write(line)  
+                    elif line.rstrip().endswith('s'):
+                        vals = line.split("-")
+                        action = vals[0].strip()
+                        prc = vals[1].strip()[:]
+                    
+                        if printerr == 1:
+                            sys.stdout.write("\r{0} {1}".format(action, prc))
+                            
                     elif line.rstrip().endswith('%'):
                         vals = line.split("-")
                         action = vals[0].strip()
-- 
GitLab