summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoah <noah@656d521f-e311-0410-88e0-e7920216d269>2003-02-25 10:33:19 +0000
committernoah <noah@656d521f-e311-0410-88e0-e7920216d269>2003-02-25 10:33:19 +0000
commit4083b99ce61506ffabaa2683650cc2500023f16b (patch)
tree2de0c9ec768cef7ddee4ab41ac1bae2588ec2ada
parent0d33dc595a34944cb713406950663235a65d92d6 (diff)
downloadpexpect-4083b99ce61506ffabaa2683650cc2500023f16b.tar.gz
Changed all 'local_timeout' variable names to 'timeout'.
This should have been done a long time ago. git-svn-id: http://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk@153 656d521f-e311-0410-88e0-e7920216d269
-rw-r--r--pexpect/pexpect.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pexpect/pexpect.py b/pexpect/pexpect.py
index 22898a9..ae5ab0b 100644
--- a/pexpect/pexpect.py
+++ b/pexpect/pexpect.py
@@ -539,7 +539,7 @@ class spawn:
compiled_pattern_list = self.compile_pattern_list(pattern)
return self.expect_list(compiled_pattern_list, timeout)
- def expect_exact (self, pattern_list, local_timeout = None):
+ def expect_exact (self, pattern_list, timeout = None):
"""This is similar to expect() except that it takes
list of plain strings instead of regular expressions.
The idea is that this should be much faster. It could also be
@@ -558,7 +558,7 @@ class spawn:
try:
incoming = ''
while 1: # Keep reading until exception or return.
- c = self.read_nonblocking (1, local_timeout)
+ c = self.read_nonblocking (1, timeout)
incoming = incoming + c
# Sequence through the list of patterns and look for a match.
@@ -593,19 +593,19 @@ class spawn:
self.match = None
raise
- def expect_list(self, pattern_list, local_timeout = None):
+ def expect_list(self, pattern_list, timeout = None):
"""This is called by expect(). This takes a list of compiled
regular expressions. This returns the index into the pattern_list
that matched the child's output.
"""
- if local_timeout is None:
- local_timeout = self.timeout
+ if timeout is None:
+ timeout = self.timeout
try:
incoming = ''
while 1: # Keep reading until exception or return.
- c = self.read_nonblocking (1, local_timeout)
+ c = self.read_nonblocking (1, timeout)
incoming = incoming + c
# Sequence through the list of patterns and look for a match.