1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

If the timeout in _poll_async_result has expired, raise the exception (#35878)

This commit is contained in:
Toshio Kuratomi 2018-02-07 22:57:16 -08:00 committed by GitHub
parent 0ccef03b43
commit 82c1456781
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -729,7 +729,12 @@ class TaskExecutor:
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'):