diff options
author | Zuul <zuul@review.opendev.org> | 2022-04-05 12:04:56 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-04-05 12:04:56 +0000 |
commit | 5d17e5fb449558ee7b0caaad298c7a2fda764631 (patch) | |
tree | 2b57eb66d6d187c50597b2242796ac8efdf853f5 | |
parent | 11210a957c7f21defbbc46826210d93b295cce18 (diff) | |
parent | a937c5562f7cca721972822d72ae7d2915bd5d52 (diff) | |
download | oslo-concurrency-5d17e5fb449558ee7b0caaad298c7a2fda764631.tar.gz |
Merge "Allow python_exec kwarg to be None"
-rw-r--r-- | oslo_concurrency/processutils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oslo_concurrency/processutils.py b/oslo_concurrency/processutils.py index fea5ecd..dea5b7a 100644 --- a/oslo_concurrency/processutils.py +++ b/oslo_concurrency/processutils.py @@ -269,8 +269,8 @@ def execute(*cmd, **kwargs): below for a detailed description. :type prlimit: :class:`ProcessLimits` :param python_exec: The python executable to use for enforcing - prlimits. If this is not set it will default to use - sys.executable. + prlimits. If this is not set or is None, it will + default to use sys.executable. :type python_exec: string :param timeout: Timeout (in seconds) to wait for the process termination. If timeout is reached, @@ -329,7 +329,7 @@ def execute(*cmd, **kwargs): on_completion = kwargs.pop('on_completion', None) preexec_fn = kwargs.pop('preexec_fn', None) prlimit = kwargs.pop('prlimit', None) - python_exec = kwargs.pop('python_exec', sys.executable) + python_exec = kwargs.pop('python_exec', None) or sys.executable timeout = kwargs.pop('timeout', None) if isinstance(check_exit_code, bool): |