summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-27 15:41:22 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-28 12:44:14 +0000
commit6caa7d1d6c122d084ed01d1f5e1dae0bf259f854 (patch)
tree7f2f7bd4d983ecfedd4154d6cecdae5f5a40c396
parent2a69358610077d134cef38d37f24eddfc73fc294 (diff)
downloadpoky-denzil.tar.gz
poky-denzil.tar.bz2
poky-denzil.zip
bitbake: command: Fix getCmdLineAction bugsdenzil
Executing "bitbake" doesn't get a sane message since the None return value wasn't being handled correctly. Also fix msg -> cmd_action['msg'] as otherwise an invalid variable is accessed which then crashes the server due to the previous bug. (Bitbake rev: c6211291ae07410832031a5274690437cc2b09a6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/command.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index c08e2ce1f5..a143aed355 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -148,8 +148,10 @@ class CommandsSync:
Get any command parsed from the commandline
"""
cmd_action = command.cooker.commandlineAction
- if cmd_action['msg']:
- raise CommandError(msg)
+ if cmd_action is None:
+ return None
+ elif 'msg' in cmd_action and cmd_action['msg']:
+ raise CommandError(cmd_action['msg'])
else:
return cmd_action['action']