1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-03 03:42:35 +01:00

fw/execution: handle error on run initialize

- Use indentcontext inside initialize_run to make sure log level
  is dedented on error.
- Ensure Executor postamble always runs, event if runner errors.
- Fix format_duration() to handle sub-second timedeltas.
This commit is contained in:
Sergei Trofimov
2018-05-10 11:44:03 +01:00
committed by Marc Bonnici
parent b41c3a3ea2
commit 1ffbce68c4
2 changed files with 9 additions and 8 deletions

View File

@@ -258,7 +258,7 @@ def format_duration(seconds, sep=' ', order=['day', 'hour', 'minute', 'second'])
continue
suffix = '' if value == 1 else 's'
result.append('{} {}{}'.format(value, item, suffix))
return sep.join(result)
return result and sep.join(result) or 'N/A'
def get_article(word):