mirror of
https://github.com/espressif/esp-idf
synced 2025-03-12 10:39:11 -04:00
Merge branch 'bugfix/ttfw_fix_flush_index_error_v4.2' into 'release/v4.2'
test: TTFW fix flush index error (v4.2) See merge request espressif/esp-idf!14261
This commit is contained in:
commit
4a12179e0c
@ -542,13 +542,11 @@ class BaseDUT(object):
|
||||
:return: match groups if match succeed otherwise None
|
||||
"""
|
||||
ret = None
|
||||
if isinstance(pattern.pattern, type(u'')):
|
||||
pattern = re.compile(BaseDUT.u_to_bytearray(pattern.pattern))
|
||||
if isinstance(data, type(u'')):
|
||||
data = BaseDUT.u_to_bytearray(data)
|
||||
if isinstance(pattern.pattern, bytes):
|
||||
pattern = re.compile(_decode_data(pattern.pattern))
|
||||
match = pattern.search(data)
|
||||
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()
|
||||
else:
|
||||
index = -1
|
||||
|
Loading…
x
Reference in New Issue
Block a user