1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

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
This commit is contained in:
Andrew Bartlett 2010-11-22 21:24:56 +11:00
parent 5767ee9663
commit e77ea04872

View File

@ -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: