diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-11-22 21:24:56 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-11-23 07:46:07 +0100 |
commit | e77ea04872dbd4dfab2c798a0b434e8211cd818b (patch) | |
tree | 4a269b8af75d095921471a010026dd97a1cf8c70 /wintest | |
parent | 5767ee96636470b32c7c819bbef75d06fe1004e6 (diff) | |
download | samba-e77ea04872dbd4dfab2c798a0b434e8211cd818b.tar.gz samba-e77ea04872dbd4dfab2c798a0b434e8211cd818b.tar.bz2 samba-e77ea04872dbd4dfab2c798a0b434e8211cd818b.zip |
wintest Allow substitute to cope with objects like pexpect.EOF
These are not strings, but may get passed into this function on the
way to pexpect.
Andrew Bartlett
Diffstat (limited to 'wintest')
-rw-r--r-- | wintest/wintest.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py index a43059975d..15b95bb1f5 100644 --- a/wintest/wintest.py +++ b/wintest/wintest.py @@ -70,6 +70,9 @@ class wintest(): ret[i] = self.substitute(ret[i]) return ret + """We may have objects such as pexpect.EOF that are not strings""" + if not isinstance(text, str): + return text while True: var_start = text.find("${") if var_start == -1: |