summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/depexp.py
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2011-06-14 15:12:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-08 17:38:06 +0100
commit521909d1350a415d19516aa1710041e30950c7cc (patch)
treee17e3f3b3d4c77fb29e109efa0daff72425d408f /lib/bb/ui/depexp.py
parent3725602ec53df116dc108b3197a426b86ca43d5f (diff)
downloadbitbake-521909d1350a415d19516aa1710041e30950c7cc.tar.gz
bitbake cooker/ui: handle cmd line parsing result by individual UI.
Changed the return result of "getCmdLineAction" to a dictionary {'action', 'msg'} to allow the individual UI decide how to handle the cmd line parsing result. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/ui/depexp.py')
-rw-r--r--lib/bb/ui/depexp.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/ui/depexp.py b/lib/bb/ui/depexp.py
index dcf7e6e2f..b62adbf85 100644
--- a/lib/bb/ui/depexp.py
+++ b/lib/bb/ui/depexp.py
@@ -199,10 +199,13 @@ class gtkthread(threading.Thread):
def main(server, eventHandler):
try:
cmdline = server.runCommand(["getCmdLineAction"])
- if not cmdline or cmdline[0] != "generateDotGraph":
+ if cmdline and not cmdline['action']:
+ print(cmdline['msg'])
+ return
+ elif not cmdline or (cmdline['action'] and cmdline['action'][0] != "generateDotGraph"):
print("This UI is only compatible with the -g option")
return
- ret = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]])
+ ret = server.runCommand(["generateDepTreeEvent", cmdline['action'][1], cmdline['action'][2]])
if ret != True:
print("Couldn't run command! %s" % ret)
return