Skip to contentSkip to conversation

sanity.bbclass: fix AttributeError in mirror format checks

PATCH New Mikko Ylinen 1 participant 1 message Jul 3, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sanity.bbclass: fix AttributeError in mirror format checks

mirrors is a list after split() and results in:

AttributeError: 'list' object has no attribute 'strip'

when the 'mirror values are pairs' check fails.

---

v2: drop redundant .strip() because it's guaranteed str(mirrors) does not have leading or trailing spaces.

 meta/classes/sanity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/sanity.bbclass +1 -1
index e8064ac483..9e0f57ddfe 100644
@@ -839,7 +839,7 @@ def check_sanity_everybuild(status, d):
 
         # Split into pairs
         if len(mirrors) % 2 != 0:
-            bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, mirrors.strip()))
+            bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, str(mirrors)))
             continue
         mirrors = list(zip(*[iter(mirrors)]*2))
 
Signature · 1 line
2.13.2