From bd0486cce39e093da35c6ffdb75106d212f8e3cf Mon Sep 17 00:00:00 2001 From: Nicholas Albion Date: Fri, 6 Oct 2023 19:02:48 +1100 Subject: [PATCH] -1 for no timeout --- pilot/const/function_calls.py | 2 +- pilot/helpers/cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pilot/const/function_calls.py b/pilot/const/function_calls.py index 908a1f9..967cfaa 100644 --- a/pilot/const/function_calls.py +++ b/pilot/const/function_calls.py @@ -44,7 +44,7 @@ def command_definition(description_command=f'A single command that needs to be e description_timeout= 'Timeout in milliseconds that represent the approximate time this command takes to finish. ' 'If you need to run a command that doesnt\'t finish by itself (eg. a command to run an app), ' - 'set the timeout to 0 and provide a process_name. ' + 'set the timeout to -1 and provide a process_name. ' 'If you need to create a directory that doesn\'t exist and is not the root project directory, ' 'always create it by running a command `mkdir`'): return { diff --git a/pilot/helpers/cli.py b/pilot/helpers/cli.py index a2c26ea..c2f72f0 100644 --- a/pilot/helpers/cli.py +++ b/pilot/helpers/cli.py @@ -124,7 +124,7 @@ def execute_command(project, command, timeout=None, process_name: str = None, fo exit_code (int): The exit code of the process. """ if timeout is not None: - if timeout == 0: + if timeout < 0: timeout = None else: if timeout < 1000: