diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-11-23 17:47:40 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-29 14:50:51 +0100 |
commit | d911f493482d29829199cce2f91f88a9b53369e1 (patch) | |
tree | 611b54882c742bed321ca6abb33d80e32a611926 /ipapython/ipautil.py | |
parent | 7b966e8577fdb56f069cf26a6ab4d6c77b8743b9 (diff) | |
download | freeipa-d911f493482d29829199cce2f91f88a9b53369e1.tar.gz freeipa-d911f493482d29829199cce2f91f88a9b53369e1.tar.xz freeipa-d911f493482d29829199cce2f91f88a9b53369e1.zip |
ipautil: remove the timeout argument of run()
The argument depends on the platform-specific timeout binary and is used
only in ipaclient.ntpconf.
Call the timeout binary explicitly in ipaclient.ntpconf and remove the
argument.
https://fedorahosted.org/freeipa/ticket/6474
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipapython/ipautil.py')
-rw-r--r-- | ipapython/ipautil.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 762cd914d..9384057bf 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -307,7 +307,7 @@ class _RunResult(collections.namedtuple('_RunResult', def run(args, stdin=None, raiseonerr=True, nolog=(), env=None, capture_output=False, skip_output=False, cwd=None, - runas=None, timeout=None, suplementary_groups=[], + runas=None, suplementary_groups=[], capture_error=False, encoding=None, redirect_output=False): """ Execute an external command. @@ -336,8 +336,6 @@ def run(args, stdin=None, raiseonerr=True, nolog=(), env=None, :param cwd: Current working directory :param runas: Name of a user that the command should be run as. The spawned process will have both real and effective UID and GID set. - :param timeout: Timeout if the command hasn't returned within the specified - number of seconds. :param suplementary_groups: List of group names that will be used as suplementary groups for subporcess. The option runas must be specified together with this option. @@ -413,11 +411,6 @@ def run(args, stdin=None, raiseonerr=True, nolog=(), env=None, if six.PY3 and isinstance(stdin, str): stdin = stdin.encode(encoding) - if timeout: - # If a timeout was provided, use the timeout command - # to execute the requested command. - args[0:0] = [paths.BIN_TIMEOUT, str(timeout)] - arg_string = nolog_replace(' '.join(_log_arg(a) for a in args), nolog) root_logger.debug('Starting external process') root_logger.debug('args=%s' % arg_string) @@ -458,9 +451,6 @@ def run(args, stdin=None, raiseonerr=True, nolog=(), env=None, if skip_output: p_out.close() # pylint: disable=E1103 - if timeout and p.returncode == 124: - root_logger.debug('Process did not complete before timeout') - root_logger.debug('Process finished, return code=%s', p.returncode) # The command and its output may include passwords that we don't want |