Commit 700b2620 authored by Daniel Brown's avatar Daniel Brown Committed by Daniel Brown
Browse files

fixing computation time parsing, more utf8 stuff

parent 6b628184
......@@ -1541,16 +1541,18 @@ class kat(object):
(stdout, stderr) = p.communicate()
r.stdout = stdout #.decode('unicode_escape')
r.stderr = stderr #.decode('unicode_escape')
r.stdout = stdout.decode('utf-8')
r.stderr = stderr.decode('utf-8')
for line in r.stdout[::-1]:
if line.lstrip().startswith('computation time:'):
try:
r.runtime = float(line.split(":")[1].replace("s",""))
except:
r.runtime = 0.0
k = r.stdout.rfind('computation time:')
if k > 0:
try:
line = r.stdout[k:]
r.runtime = float(line.split(":")[1].replace("s",""))
except:
r.runtime = 0.0
r.runDateTime = datetime.datetime.now()
# If Finesse returned an error, just print that and exit!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment