From 4fadc30b92d42523fee013c168d47bc93dfe4fbd Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 14 Jun 2011 15:12:16 +0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/depexp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/ui/depexp.py') 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): 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 -- cgit v1.2.3-54-g00ecf