summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-22 21:24:56 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-23 07:46:07 +0100
commite77ea04872dbd4dfab2c798a0b434e8211cd818b (patch)
tree4a269b8af75d095921471a010026dd97a1cf8c70
parent5767ee96636470b32c7c819bbef75d06fe1004e6 (diff)
downloadsamba-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
-rw-r--r--wintest/wintest.py3
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: