All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [yocto][error-report-web][PATCH] parser: make contains_tag ignore non-str fields
       [not found] <1662D8277DF9F532.2349@lists.yoctoproject.org>
@ 2021-02-23  4:24 ` Yi Fan Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Yi Fan Yu @ 2021-02-23  4:24 UTC (permalink / raw)
  To: yocto, Richard Purdie

RP,

if you want to get this merged too that would be great.

yifan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [yocto][error-report-web][PATCH] parser: make contains_tag ignore non-str fields
@ 2021-02-12  0:21 Yi Fan Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Yi Fan Yu @ 2021-02-12  0:21 UTC (permalink / raw)
  To: yocto

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 <yifan.yu@windriver.com>
---
 Post/parser.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Post/parser.py b/Post/parser.py
index ed65d4f..f54482a 100644
--- a/Post/parser.py
+++ b/Post/parser.py
@@ -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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-23  4:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1662D8277DF9F532.2349@lists.yoctoproject.org>
2021-02-23  4:24 ` [yocto][error-report-web][PATCH] parser: make contains_tag ignore non-str fields Yi Fan Yu
2021-02-12  0:21 Yi Fan Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.