All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build: create_progress_handler: fix calling 'get' on NoneType
@ 2020-07-27 23:24 Chris Laplante
  0 siblings, 0 replies; only message in thread
From: Chris Laplante @ 2020-07-27 23:24 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Chris Laplante

Just use the |resolve| function which already takes care of it.

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
 lib/bb/build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/build.py b/lib/bb/build.py
index 23b6ee45..d1457b84 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -346,7 +346,7 @@ def create_progress_handler(func, progress, logfile, d):
             cls_obj = functools.reduce(resolve, cls.split("."), bb.utils._context)
             if not cls_obj:
                 # Fall-back on __builtins__
-                cls_obj = functools.reduce(lambda x, y: x.get(y), cls.split("."), __builtins__)
+                cls_obj = functools.reduce(resolve, cls.split("."), __builtins__)
             if cls_obj:
                 return cls_obj(d, outfile=logfile, otherargs=otherargs)
             bb.warn('%s: unknown custom progress handler in task progress varflag value "%s", ignoring' % (func, cls))
-- 
2.17.1


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

only message in thread, other threads:[~2020-07-27 23:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 23:24 [PATCH] build: create_progress_handler: fix calling 'get' on NoneType Chris Laplante

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.