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

if seconds are specified, min is 1

This commit is contained in:
Brian Coca 2016-06-27 09:28:53 -04:00
parent d83962d3f5
commit 1b7b1ca15e

View file

@ -109,6 +109,8 @@ class ActionModule(ActionBase):
old_settings = None
try:
if seconds is not None:
if seconds < 1:
seconds = 1
# setup the alarm handler
signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(seconds)