aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-14 12:27:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-14 12:35:25 +0000
commitc6211291ae07410832031a5274690437cc2b09a6 (patch)
treebbd84f5b99ffae162638be16d58aa78402575c20
parente637a635bf7b5a9a2e9dc20afc18aceec98d578f (diff)
downloadbitbake-c6211291ae07410832031a5274690437cc2b09a6.tar.gz
command: Fix getCmdLineAction bugs
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/command.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 39a2e18a0..c842497e6 100644
--- a/lib/bb/command.py
+++ b/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']