1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

utils/trace_cmd: update for Python 3

re._pattern_type became re.Pattern in Python 3.
This commit is contained in:
Sergei Trofimov 2020-01-10 13:23:32 +00:00 committed by Marc Bonnici
parent dfb4737e51
commit fd8a7e442c

View File

@ -323,7 +323,7 @@ class TraceCmdParser(object):
continue
body_parser = EVENT_PARSER_MAP.get(event_name, default_body_parser)
if isinstance(body_parser, (str, re._pattern_type)): # pylint: disable=protected-access
if isinstance(body_parser, (str, re.Pattern)): # pylint: disable=protected-access
body_parser = regex_body_parser(body_parser)
yield TraceCmdEvent(parser=body_parser, **match.groupdict())