From e77ea04872dbd4dfab2c798a0b434e8211cd818b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 22 Nov 2010 21:24:56 +1100 Subject: 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 --- wintest/wintest.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wintest/wintest.py') 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: -- cgit