parser: make contains_tag ignore non-str fields
PATCH 1/1 parser: make contains_tag ignore non-str fields
if MACHINE is set to False (in a selftest build), contains_tags should skip that field instead of searching for the character '<'.
[YOCTO #14208]
Signed-off-by Yi Fan Yu <[email protected]>
--- Post/parser.py | 4 ++++ 1 file changed, 4 insertions(+)
Post/parser.py +4 -0
@@ -21,10 +21,14 @@ class Parser: # returns true if the values contain '<' char # Ignore the failures field (which is an array anyway) + # Ignore any non-str fields too [YOCTO #14208] def contains_tags (self, data): for key,val in data.items(): if key == 'failures': continue + + if not isinstance(val, str): + continue if '<' in val: return True
Signature · 1 line
2.25.1