Skip to content

Commit

Permalink
fix contrib.docker_runner exit code check #2355
Browse files Browse the repository at this point in the history
  • Loading branch information
yonromai committed Feb 19, 2018
1 parent 8501e5d commit 318b0e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions luigi/contrib/docker_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ def run(self):
self._client.start(container['Id'])

exit_status = self._client.wait(container['Id'])
# docker-py>=3.0.0 returns a dict instead of the status code directly
if type(exit_status) is dict:
exit_status = exit_status['StatusCode']

if exit_status != 0:
stdout = False
stderr = True
Expand Down

0 comments on commit 318b0e6

Please sign in to comment.