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:
parent
5767ee9663
commit
e77ea04872
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user