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 old_settings = None
try: try:
if seconds is not None: if seconds is not None:
if seconds < 1:
seconds = 1
# setup the alarm handler # setup the alarm handler
signal.signal(signal.SIGALRM, timeout_handler) signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(seconds) signal.alarm(seconds)