git.samba.org
/
mdw
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5767ee9
)
wintest Allow substitute to cope with objects like pexpect.EOF
author
Andrew Bartlett
<abartlet@samba.org>
Mon, 22 Nov 2010 10:24:56 +0000
(21:24 +1100)
committer
Andrew Bartlett
<abartlet@samba.org>
Tue, 23 Nov 2010 06:46:07 +0000
(07:46 +0100)
These are not strings, but may get passed into this function on the
way to pexpect.
Andrew Bartlett
wintest/wintest.py
patch
|
blob
|
history
diff --git
a/wintest/wintest.py
b/wintest/wintest.py
index a43059975d04b826a110e5422c6d7c7311c3b23c..15b95bb1f5895ae90bc6002d342bd6b28b31ffaa 100644
(file)
--- 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: