mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/ttfw_fix_flush_index_error_v4.1' into 'release/v4.1'
test: TTFW fix flush index error (v4.1) See merge request espressif/esp-idf!14262
This commit is contained in:
commit
a121a37edb
@ -542,13 +542,11 @@ class BaseDUT(object):
|
|||||||
:return: match groups if match succeed otherwise None
|
:return: match groups if match succeed otherwise None
|
||||||
"""
|
"""
|
||||||
ret = None
|
ret = None
|
||||||
if isinstance(pattern.pattern, type(u'')):
|
if isinstance(pattern.pattern, bytes):
|
||||||
pattern = re.compile(BaseDUT.u_to_bytearray(pattern.pattern))
|
pattern = re.compile(_decode_data(pattern.pattern))
|
||||||
if isinstance(data, type(u'')):
|
|
||||||
data = BaseDUT.u_to_bytearray(data)
|
|
||||||
match = pattern.search(data)
|
match = pattern.search(data)
|
||||||
if match:
|
if match:
|
||||||
ret = tuple(None if x is None else x.decode() for x in match.groups())
|
ret = tuple(x for x in match.groups())
|
||||||
index = match.end()
|
index = match.end()
|
||||||
else:
|
else:
|
||||||
index = -1
|
index = -1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user