git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
380739e
)
wintest: fixed casefold handling in expect calls
author
Andrew Tridgell
<tridge@samba.org>
Wed, 1 Dec 2010 02:24:35 +0000
(13:24 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Wed, 1 Dec 2010 05:09:57 +0000
(16:09 +1100)
wintest/wintest.py
patch
|
blob
|
history
diff --git
a/wintest/wintest.py
b/wintest/wintest.py
index cc24c0d22a6cb729a2b13f761f102645fa0f64d7..201ed089e2aa0f635f0cfbf93092174267a377ed 100644
(file)
--- a/
wintest/wintest.py
+++ b/
wintest/wintest.py
@@
-231,7
+231,12
@@
class wintest():
def expect_sub(line, timeout=ret.timeout, casefold=casefold):
line = self.substitute(line)
if casefold:
- line = "(?i)" + line
+ if isinstance(line, list):
+ for i in range(len(line)):
+ if isinstance(line[i], str):
+ line[i] = '(?i)' + line[i]
+ elif isinstance(line, str):
+ line = '(?i)' + line
return ret.old_expect(line, timeout=timeout)
ret.old_sendline = ret.sendline