summaryrefslogtreecommitdiffstats
path: root/bitbake/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:42 +0100
commit4fadc30b92d42523fee013c168d47bc93dfe4fbd (patch)
treee37df0b79a8d6e20fd8b93bf065c9cd7bb033a5a /bitbake/lib/bb/ui/depexp.py
parent18ce7e2ef3a3b65bc0abca4f0135005249e6d2ca (diff)
downloadpoky-4fadc30b92d42523fee013c168d47bc93dfe4fbd.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. (Bitbake rev: 521909d1350a415d19516aa1710041e30950c7cc) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/depexp.py')
-rw-r--r--bitbake/lib/bb/ui/depexp.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py
index dcf7e6e2f3..b62adbf851 100644
--- a/bitbake/lib/bb/ui/depexp.py
+++ b/bitbake/lib/bb/ui/depexp.py
@@ -199,10 +199,13 @@ class gtkthread(threading.Thread):
199def main(server, eventHandler): 199def main(server, eventHandler):
200 try: 200 try:
201 cmdline = server.runCommand(["getCmdLineAction"]) 201 cmdline = server.runCommand(["getCmdLineAction"])
202 if not cmdline or cmdline[0] != "generateDotGraph": 202 if cmdline and not cmdline['action']:
203 print(cmdline['msg'])
204 return
205 elif not cmdline or (cmdline['action'] and cmdline['action'][0] != "generateDotGraph"):
203 print("This UI is only compatible with the -g option") 206 print("This UI is only compatible with the -g option")
204 return 207 return
205 ret = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]]) 208 ret = server.runCommand(["generateDepTreeEvent", cmdline['action'][1], cmdline['action'][2]])
206 if ret != True: 209 if ret != True:
207 print("Couldn't run command! %s" % ret) 210 print("Couldn't run command! %s" % ret)
208 return 211 return