All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] icecc.bbclass: fix syntax error
@ 2022-02-22 13:26 Martin Jansa
  0 siblings, 0 replies; only message in thread
From: Martin Jansa @ 2022-02-22 13:26 UTC (permalink / raw)
  To: openembedded-core; +Cc: Martin Jansa

'class' is already taken as keyword and python doesn't like this:

  ERROR: Error in compiling python function in oe-core/meta/classes/icecc.bbclass, line 151:

  The code lines resulting in this error were:
       0020:    check_pn = set([pn, bpn])
       0021:
       0022:    class_disable = (d.getVar('ICECC_CLASS_DISABLE') or "").split()
       0023:
   *** 0024:    for class in class_disable:
       0025:        if bb.data.inherits_class(class, d):
       0026:            bb.debug(1, "%s: class %s found in disable, disable icecc" % (pn, class))
       0027:            return "no"
       0028:
  SyntaxError: invalid syntax (icecc.bbclass, line 151)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/icecc.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 90ea3d8df6..a550b6af24 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -148,9 +148,9 @@ def use_icecc(bb,d):
 
     class_disable = (d.getVar('ICECC_CLASS_DISABLE') or "").split()
 
-    for class in class_disable:
-        if bb.data.inherits_class(class, d):
-            bb.debug(1, "%s: class %s found in disable, disable icecc" % (pn, class))
+    for bbclass in class_disable:
+        if bb.data.inherits_class(bbclass, d):
+            bb.debug(1, "%s: bbclass %s found in disable, disable icecc" % (pn, bbclass))
             return "no"
 
     disabled_recipes = (d.getVar('ICECC_RECIPE_DISABLE') or "").split()
-- 
2.35.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-22 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 13:26 [PATCH] icecc.bbclass: fix syntax error Martin Jansa

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.