Skip to content

Commit

Permalink
If the timeout in _poll_async_result has expired, raise the exception (
Browse files Browse the repository at this point in the history
  • Loading branch information
abadger committed Feb 8, 2018
1 parent 0ccef03 commit 82c1456
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ansible/executor/task_executor.py
Expand Up @@ -729,7 +729,12 @@ def _poll_async_result(self, result, templar, task_vars=None):
except AttributeError:
pass

time_left -= self._task.poll
# Little hack to raise the exception if we've exhausted the timeout period
time_left -= self._task.poll
if time_left <= 0:
raise
else:
time_left -= self._task.poll

if int(async_result.get('finished', 0)) != 1:
if async_result.get('_ansible_parsed'):
Expand Down

0 comments on commit 82c1456

Please sign in to comment.