From 5778e35378dfa76958239f9a0ecb71ed90c16225 Mon Sep 17 00:00:00 2001 From: Chang Rebecca Swee Fun Date: Wed, 28 Jun 2017 09:59:18 +0800 Subject: scriptutils: pass in logger as parameter logger was not defined in scriptutils.py based on the observation in python traceback. Traceback (most recent call last): File "/workdir/poky/scripts/devtool", line 351, in ret = main() File "/workdir/poky/scripts/devtool", line 338, in main ret = args.func(args, config, basepath, workspace) File "/workdir/poky/scripts/lib/devtool/utilcmds.py", line 55, in edit_recipe return scriptutils.run_editor(find_recipe(args, config, basepath, workspace)) File "/workdir/poky/scripts/lib/scriptutils.py", line 141, in run_editor logger.error("Execution of '%s' failed: %s" % (editor, exc)) NameError: name 'logger' is not defined We pass in logger as parameter to run_editor() from where it has been called (devtool/utilcmds.py and recipetool/newappend.py), which both modules already has logger setup. (From OE-Core rev: 21f04b61973dd9029f0e6bff5445e31cd762bf32) Signed-off-by: Chang Rebecca Swee Fun Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- scripts/lib/devtool/utilcmds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/lib/devtool') diff --git a/scripts/lib/devtool/utilcmds.py b/scripts/lib/devtool/utilcmds.py index 0437e6417c..938d88afc0 100644 --- a/scripts/lib/devtool/utilcmds.py +++ b/scripts/lib/devtool/utilcmds.py @@ -49,7 +49,7 @@ def edit_recipe(args, config, basepath, workspace): raise DevtoolError("Recipe file for %s is not under the workspace" % args.recipename) - return scriptutils.run_editor(recipefile) + return scriptutils.run_editor(recipefile, logger) def configure_help(args, config, basepath, workspace): -- cgit v1.2.3-54-g00ecf