diff options
Diffstat (limited to 'bitbake/lib/bb/ui/depexp.py')
-rw-r--r-- | bitbake/lib/bb/ui/depexp.py | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py index 1a716a88bf..85910f6925 100644 --- a/bitbake/lib/bb/ui/depexp.py +++ b/bitbake/lib/bb/ui/depexp.py | |||
@@ -198,17 +198,23 @@ class gtkthread(threading.Thread): | |||
198 | 198 | ||
199 | def main(server, eventHandler): | 199 | def main(server, eventHandler): |
200 | try: | 200 | try: |
201 | cmdline = server.runCommand(["getCmdLineAction"]) | 201 | cmdline, error = server.runCommand(["getCmdLineAction"]) |
202 | if cmdline and not cmdline['action']: | 202 | if error: |
203 | print(cmdline['msg']) | 203 | print("Error getting bitbake commandline: %s" % error) |
204 | return | 204 | return 1 |
205 | elif not cmdline or (cmdline['action'] and cmdline['action'][0] != "generateDotGraph"): | 205 | elif not cmdline: |
206 | print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") | ||
207 | return 1 | ||
208 | elif not cmdline or cmdline[0] != "generateDotGraph": | ||
206 | print("This UI is only compatible with the -g option") | 209 | print("This UI is only compatible with the -g option") |
207 | return | 210 | return 1 |
208 | ret = server.runCommand(["generateDepTreeEvent", cmdline['action'][1], cmdline['action'][2]]) | 211 | ret, error = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]]) |
209 | if ret != True: | 212 | if error: |
210 | print("Couldn't run command! %s" % ret) | 213 | print("Error running command '%s': %s" % (cmdline, error)) |
211 | return | 214 | return 1 |
215 | elif ret != True: | ||
216 | print("Error running command '%s': returned %s" % (cmdline, ret)) | ||
217 | return 1 | ||
212 | except xmlrpclib.Fault as x: | 218 | except xmlrpclib.Fault as x: |
213 | print("XMLRPC Fault getting commandline:\n %s" % x) | 219 | print("XMLRPC Fault getting commandline:\n %s" % x) |
214 | return | 220 | return |
@@ -234,7 +240,9 @@ def main(server, eventHandler): | |||
234 | try: | 240 | try: |
235 | event = eventHandler.waitEvent(0.25) | 241 | event = eventHandler.waitEvent(0.25) |
236 | if gtkthread.quit.isSet(): | 242 | if gtkthread.quit.isSet(): |
237 | server.runCommand(["stateStop"]) | 243 | _, error = server.runCommand(["stateStop"]) |
244 | if error: | ||
245 | print('Unable to cleanly stop: %s' % error) | ||
238 | break | 246 | break |
239 | 247 | ||
240 | if event is None: | 248 | if event is None: |
@@ -310,9 +318,13 @@ def main(server, eventHandler): | |||
310 | break | 318 | break |
311 | if shutdown == 1: | 319 | if shutdown == 1: |
312 | print("\nSecond Keyboard Interrupt, stopping...\n") | 320 | print("\nSecond Keyboard Interrupt, stopping...\n") |
313 | server.runCommand(["stateStop"]) | 321 | _, error = server.runCommand(["stateStop"]) |
322 | if error: | ||
323 | print('Unable to cleanly stop: %s' % error) | ||
314 | if shutdown == 0: | 324 | if shutdown == 0: |
315 | print("\nKeyboard Interrupt, closing down...\n") | 325 | print("\nKeyboard Interrupt, closing down...\n") |
316 | server.runCommand(["stateShutdown"]) | 326 | _, error = server.runCommand(["stateShutdown"]) |
327 | if error: | ||
328 | print('Unable to cleanly shutdown: %s' % error) | ||
317 | shutdown = shutdown + 1 | 329 | shutdown = shutdown + 1 |
318 | pass | 330 | pass |