diff options
| author | Thomas Kluyver <takowl@gmail.com> | 2013-10-02 15:24:27 -0700 |
|---|---|---|
| committer | Thomas Kluyver <takowl@gmail.com> | 2013-10-02 15:24:27 -0700 |
| commit | bec2d72308c7b0cec0f5ba1d186e480f4cf11974 (patch) | |
| tree | 91173cbf7c48d76ce5c86da3d50dd821f4ef404d /pexpect/__init__.py | |
| parent | 9a632507cc862381125cb9b130b47c20895fbc5c (diff) | |
| download | pexpect-bec2d72308c7b0cec0f5ba1d186e480f4cf11974.tar.gz | |
Fix check on timeout
Closes gh-2
Diffstat (limited to 'pexpect/__init__.py')
| -rw-r--r-- | pexpect/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py index c257490..0435d4b 100644 --- a/pexpect/__init__.py +++ b/pexpect/__init__.py @@ -1498,7 +1498,7 @@ class spawn(object): self.match_index = index return self.match_index # No match at this point - if timeout < 0 and timeout is not None: + if (timeout is not None) and (timeout < 0): raise TIMEOUT('Timeout exceeded in expect_any().') # Still have time left, so read more data c = self.read_nonblocking(self.maxread, timeout) |
