might not be in the last line

This commit is contained in:
Martin Diehl 2020-11-01 18:34:52 +01:00
parent 93faf4f2b3
commit 7059e6af6e
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ class Marc:
f.seek(0)
try:
v = int(re.search('Exit number ([0-9]+)',f.readlines()[-1]).group(1))
v = int(re.search('Exit number ([0-9]+)',''.join(f.readlines())).group(1))
except (AttributeError,ValueError):
raise RuntimeError('Marc simulation failed (unknown return value)')