diff options
Diffstat (limited to 'bitbake/lib/bb/ui/ncurses.py')
| -rw-r--r-- | bitbake/lib/bb/ui/ncurses.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/ncurses.py b/bitbake/lib/bb/ui/ncurses.py index f6ea7f9bca..98647fc3e0 100644 --- a/bitbake/lib/bb/ui/ncurses.py +++ b/bitbake/lib/bb/ui/ncurses.py | |||
| @@ -236,15 +236,18 @@ class NCursesUI: | |||
| 236 | shutdown = 0 | 236 | shutdown = 0 |
| 237 | 237 | ||
| 238 | try: | 238 | try: |
| 239 | cmdline = server.runCommand(["getCmdLineAction"]) | 239 | cmdline, error = server.runCommand(["getCmdLineAction"]) |
| 240 | if not cmdline: | 240 | if not cmdline: |
| 241 | print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") | 241 | print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") |
| 242 | return | 242 | return |
| 243 | elif not cmdline['action']: | 243 | elif error: |
| 244 | print(cmdline['msg']) | 244 | print("Error getting bitbake commandline: %s" % error) |
| 245 | return | 245 | return |
| 246 | ret = server.runCommand(cmdline['action']) | 246 | ret, error = server.runCommand(cmdline) |
| 247 | if ret != True: | 247 | if error: |
| 248 | print("Error running command '%s': %s" % (cmdline, error)) | ||
| 249 | return | ||
| 250 | elif ret != True: | ||
| 248 | print("Couldn't get default commandlind! %s" % ret) | 251 | print("Couldn't get default commandlind! %s" % ret) |
| 249 | return | 252 | return |
| 250 | except xmlrpclib.Fault as x: | 253 | except xmlrpclib.Fault as x: |
| @@ -345,10 +348,14 @@ class NCursesUI: | |||
| 345 | exitflag = True | 348 | exitflag = True |
| 346 | if shutdown == 1: | 349 | if shutdown == 1: |
| 347 | mw.appendText("Second Keyboard Interrupt, stopping...\n") | 350 | mw.appendText("Second Keyboard Interrupt, stopping...\n") |
| 348 | server.runCommand(["stateStop"]) | 351 | _, error = server.runCommand(["stateStop"]) |
| 352 | if error: | ||
| 353 | print("Unable to cleanly stop: %s" % error) | ||
| 349 | if shutdown == 0: | 354 | if shutdown == 0: |
| 350 | mw.appendText("Keyboard Interrupt, closing down...\n") | 355 | mw.appendText("Keyboard Interrupt, closing down...\n") |
| 351 | server.runCommand(["stateShutdown"]) | 356 | _, error = server.runCommand(["stateShutdown"]) |
| 357 | if error: | ||
| 358 | print("Unable to cleanly shutdown: %s" % error) | ||
| 352 | shutdown = shutdown + 1 | 359 | shutdown = shutdown + 1 |
| 353 | pass | 360 | pass |
| 354 | 361 | ||
