minor enhancement to docker return code flow
@@ -258,9 +258,13 @@ def run_docker(definition, dataset, count, runs, timeout, batch, cpu_limit,
exit_code = container.wait(timeout=timeout)
# Exit if exit code
- if exit_code.StatusCode not in [0, None]:
+ try:
+ exit_code = exit_code.StatusCode
+ except AttributeError:
+ pass
+ if exit_code not in [0, None]:
logger.error(colors.color(container.logs().decode(), fg='red'))
- logger.error('Child process for container %s raised exception %d' % (container.short_id, exit_code.StatusCode))
+ logger.error('Child process for container %s raised exception %d' % (container.short_id, exit_code))
except:
logger.error('Container.wait for container %s failed with exception' % container.short_id)
traceback.print_exc()
