generic-poky/bitbake/lib/bb/ui
Christopher Larson c1c20c02a0 bitbake: command: add error to return of runCommand
Currently, command.py can return an error message from runCommand, due to
being unable to run the command, yet few of our UIs (just hob) can handle it
today. This can result in seeing a TypeError with traceback in certain rare
circumstances.

To resolve this, we need a clean way to get errors back from runCommand,
without having to isinstance() the return value. This implements such a thing
by making runCommand also return an error (or None if no error occurred).

As runCommand now has a method of returning errors, we can also alter the
getCmdLineAction bits such that the returned value is just the action, not an
additional message. If a sync command wants to return an error, it raises
CommandError(message), and the message will be passed to the caller
appropriately.

Example Usage:

    result, error = server.runCommand(...)
    if error:
        log.error('Unable to run command: %s' % error)
        return 1

(Bitbake rev: 717831b8315cb3904d9b590e633000bc897e8fb6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:22 +00:00
..
crumbs bitbake: command: add error to return of runCommand 2012-11-01 11:46:22 +00:00
icons bitbake: hob/settings: implement a new tab in settings dialog to show SSTATE_MIRRORS 2012-09-28 11:13:08 +01:00
__init__.py Formatting cleanups 2010-07-02 15:41:32 +01:00
depexp.py bitbake: command: add error to return of runCommand 2012-11-01 11:46:22 +00:00
goggle.py bitbake: command: add error to return of runCommand 2012-11-01 11:46:22 +00:00
hob.py Hob: lower the limitation for PyGTK 2012-06-08 12:13:15 +01:00
knotty.py bitbake: command: add error to return of runCommand 2012-11-01 11:46:22 +00:00
ncurses.py bitbake: command: add error to return of runCommand 2012-11-01 11:46:22 +00:00
puccho.py Rename the ui 'init' method to 'main' 2011-01-04 14:46:47 +00:00
uievent.py bitbake: Add client socket info for BitBakeServerConnection 2012-02-23 22:52:16 +00:00
uihelper.py bitbake: uihelper: Set update flag when start event encountered 2012-10-30 16:55:40 +00:00