diff options
author | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2003-02-21 05:12:54 +0000 |
---|---|---|
committer | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2003-02-21 05:12:54 +0000 |
commit | 48b1195b9035bce5ad66767d9c760a03142576ce (patch) | |
tree | c7088abdc635443cd8cc054fbf4a1a5424462158 | |
parent | f791e57b752889a61f5a7ca7172e5e130e443d25 (diff) | |
download | pexpect-48b1195b9035bce5ad66767d9c760a03142576ce.tar.gz |
Added type check for TIMEOUT in compile list method.
git-svn-id: http://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk@150 656d521f-e311-0410-88e0-e7920216d269
-rw-r--r-- | pexpect/pexpect.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pexpect/pexpect.py b/pexpect/pexpect.py index 5ed2abd..0d7896a 100644 --- a/pexpect/pexpect.py +++ b/pexpect/pexpect.py @@ -457,10 +457,12 @@ class spawn: compiled_pattern_list.append(re.compile(p, re.DOTALL)) elif p is EOF: compiled_pattern_list.append(EOF) + elif p is TIMEOUT: + compiled_pattern_list.append(TIMEOUT) elif type(p) is type(re.compile('')): compiled_pattern_list.append(p) else: - raise TypeError, 'Argument must be one of StringType, EOF, SRE_Pattern, or a list of those type. %s' % str(type(p)) + raise TypeError, 'Argument must be one of StringType, EOF, TIMEOUT, SRE_Pattern, or a list of those type. %s' % str(type(p)) return compiled_pattern_list |