diff options
author | Jeff Quast <contact@jeffquast.com> | 2014-11-24 23:27:52 -0800 |
---|---|---|
committer | Jeff Quast <contact@jeffquast.com> | 2014-11-24 23:27:52 -0800 |
commit | 5e3e8cb36b55267688dd91b1b5c14ebfa8e061ee (patch) | |
tree | 0252ad97984a39397fa09770052eaf4dd944fa15 /pexpect/__init__.py | |
parent | 4382f40f69eb7bdd84f0b46282f2cbbb65c5552b (diff) | |
download | pexpect-git-5e3e8cb36b55267688dd91b1b5c14ebfa8e061ee.tar.gz |
Change run* timeout=-1 -> timeout=30
Leave the "if timeout == -1" in spawn intact, for any
poor fool who explicitly set timeout of -1 to implicitly
mean timeout of 30.
Diffstat (limited to 'pexpect/__init__.py')
-rw-r--r-- | pexpect/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py index 9a914eb..eae9646 100644 --- a/pexpect/__init__.py +++ b/pexpect/__init__.py @@ -76,7 +76,7 @@ __revision__ = '' __all__ = ['ExceptionPexpect', 'EOF', 'TIMEOUT', 'spawn', 'spawnu', 'run', 'runu', 'which', 'split_command_line', '__version__', '__revision__'] -def run(command, timeout=-1, withexitstatus=False, events=None, +def run(command, timeout=30, withexitstatus=False, events=None, extra_args=None, logfile=None, cwd=None, env=None): ''' @@ -164,7 +164,7 @@ def run(command, timeout=-1, withexitstatus=False, events=None, events=events, extra_args=extra_args, logfile=logfile, cwd=cwd, env=env, _spawn=spawn) -def runu(command, timeout=-1, withexitstatus=False, events=None, +def runu(command, timeout=30, withexitstatus=False, events=None, extra_args=None, logfile=None, cwd=None, env=None, **kwargs): """This offers the same interface as :func:`run`, but using unicode. |