diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-14 12:27:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-14 12:36:04 +0000 |
commit | dc637ae860f57161c97b04d3e91612d3e1600f37 (patch) | |
tree | ddb8a1e23817d7aba466b395421142b26357bd6d /bitbake | |
parent | 1572c1517c96d6556a832b9511957d311a5f457d (diff) | |
download | poky-dc637ae860f57161c97b04d3e91612d3e1600f37.tar.gz |
bitbake: 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.
(Bitbake rev: c6211291ae07410832031a5274690437cc2b09a6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/command.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 39a2e18a02..c842497e63 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -148,8 +148,10 @@ class CommandsSync: | |||
148 | Get any command parsed from the commandline | 148 | Get any command parsed from the commandline |
149 | """ | 149 | """ |
150 | cmd_action = command.cooker.commandlineAction | 150 | cmd_action = command.cooker.commandlineAction |
151 | if cmd_action['msg']: | 151 | if cmd_action is None: |
152 | raise CommandError(msg) | 152 | return None |
153 | elif 'msg' in cmd_action and cmd_action['msg']: | ||
154 | raise CommandError(cmd_action['msg']) | ||
153 | else: | 155 | else: |
154 | return cmd_action['action'] | 156 | return cmd_action['action'] |
155 | 157 | ||