Skip to content
Snippets Groups Projects
Commit 88de7f96 authored by Andreas Freise's avatar Andreas Freise
Browse files

chaning error behaviour a little: if Finesse returns

an error I would prefer to just print that and exit(1).
parent ee3f75be
No related branches found
No related tags found
No related merge requests found
......@@ -445,9 +445,6 @@ class kat(object):
cmd.append(katfile.name)
#if self.verbose:
#print cmd
p=subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
err = ""
......@@ -455,14 +452,17 @@ class kat(object):
for line in iter(p.stderr.readline, ""):
if len(line) > 0 and printerr == 1:
if len(line) > 0:
if line.rstrip().endswith('%'):
vals = line.split("-")
action = vals[0].strip()
prc = vals[1].strip()[:-1]
if printerr == 1:
sys.stdout.write("\r{0} {1}%".format(action, prc))
elif line[0:3] == '** ':
if self.verbose: sys.stdout.write(line)
else:
err += line
[out,errpipe] = p.communicate()
if printout == 1:
......@@ -477,11 +477,10 @@ class kat(object):
r.runDateTime = datetime.datetime.now()
# If Finesse returned an error, just print that and exit!
if p.returncode != 0:
raise pkex.FinesseRunError(err, katfile.name)
#if printout == 1: print out
#if printerr == 1: print err
print err
sys.exit(1)
root = os.path.splitext(katfile.name)
base = os.path.basename(root[0])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment