[bitbake-devel] depexp: don't use undefined variable 'logging'

Submitted by Olof Johansson on Aug. 21, 2014, 8:25 a.m. | Patch ID: 78733


Message ID 1408609524-1637-1-git-send-email-olof.johansson@axis.com
State New
Headers show

Commit Message

Olof Johansson Aug. 21, 2014, 8:25 a.m.
This fixes an issue when trying to use depexp without specifying a
recipe. Before change:

  $ bitbake -g -udepexp
  Traceback (most recent call last):
    File ".../bitbake/bin/bitbake", line 382, in <module>
      ret = main()
    File ".../bitbake/bin/bitbake", line 370, in main
      return ui_module.main(server_connection.connection, server_connection.events, configParams)
    File ".../bitbake/lib/bb/ui/depexp.py", line 201, in main
  NameError: global name 'logger' is not defined

After change:

  $ bitbake -g -udepexp
  Please specify a package name for dependency graph generation.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
 lib/bb/ui/depexp.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/bb/ui/depexp.py b/lib/bb/ui/depexp.py
index 4578dce..5d13b5b 100644
--- a/lib/bb/ui/depexp.py
+++ b/lib/bb/ui/depexp.py
@@ -198,7 +198,7 @@  def main(server, eventHandler, params):
             print("Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
             return 1
         if 'msg' in cmdline and cmdline['msg']:
-            logger.error(cmdline['msg'])
+            print(cmdline['msg'])
             return 1
         cmdline = cmdline['action']
         if not cmdline or cmdline[0] != "generateDotGraph":