Commit 6a3082aa authored by Mario Hock's avatar Mario Hock

FIX: don't crash on missing -e ENV parameters

also: correctly display multi-line ENV parameter results
parent 343dd7e5
......@@ -206,7 +206,17 @@ class LogAnalyzer:
if ( env ):
env_head = self.cnl_file.get_environment()
for e in env:
head.append( '{}: {}'.format(e, pretty_json(env_head[e])) )
json = env_head.get(e)
if ( json ):
text = pretty_json(json)
it = iter(text.split("\n"))
# first line
head.append( '{}: {}'.format(e, next(it)) )
# subsequent lines (if any)
for line in it:
head.append( line )
head.append( "Duration: {}".format(human_readable_from_seconds(self.experiment_duration)) )
......
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