forked from espressif/esp-idf
tiny-test-fw: fix exception when expect RegEx:
match.groups() could return None. We can't do decode on None object.
This commit is contained in:
@ -530,7 +530,7 @@ class BaseDUT(object):
|
|||||||
data = BaseDUT.u_to_bytearray(data)
|
data = BaseDUT.u_to_bytearray(data)
|
||||||
match = pattern.search(data)
|
match = pattern.search(data)
|
||||||
if match:
|
if match:
|
||||||
ret = tuple(x.decode() for x in match.groups())
|
ret = tuple(None if x is None else x.decode() for x in match.groups())
|
||||||
index = match.end()
|
index = match.end()
|
||||||
else:
|
else:
|
||||||
index = -1
|
index = -1
|
||||||
|
Reference in New Issue
Block a user