generic-poky/bitbake/lib/bb
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
..
fetch2 bitbake: fetch2: raise an exception if user specifies protocol=git with http:// 2012-10-03 17:30:17 +01:00
parse bitbake: parse/ConfHandler: Add negative lookahead to spot some quoting problems 2012-09-28 11:15:04 +01:00
pysh make exception handling syntax consistent 2011-06-15 11:13:13 +01:00
server bitbake: command: add error to return of runCommand 2012-11-01 11:46:22 +00:00
tests bitbake: tests/utils: Add test for explode_dep_versions2 2012-10-02 11:40:54 +01:00
ui bitbake: command: add error to return of runCommand 2012-11-01 11:46:22 +00:00
COW.py Apply some 2to3 refactorings 2010-07-02 15:41:37 +01:00
__init__.py bitbake: Update version to 1.16.0 2012-10-02 11:40:56 +01:00
build.py bitbake: build/siggen: Add support for stamp 'clean' masks 2012-09-20 11:48:38 +01:00
cache.py bitbake: build/siggen: Add support for stamp 'clean' masks 2012-09-20 11:48:38 +01:00
cache_extra.py bitbake: Add description into the cache and clean up cache duplication 2012-02-02 16:55:28 +00:00
checksum.py bitbake: implement checksums for local files in SRC_URI 2012-05-23 11:35:04 +01:00
codeparser.py bitbake: refactor out codeparser cache into a separate class 2012-05-23 11:33:18 +01:00
command.py bitbake: command: add error to return of runCommand 2012-11-01 11:46:22 +00:00
compat.py bitbake: compat, event: use OrderedDict from py2.7 for the event handlers 2012-09-20 10:29:33 +01:00
cooker.py bitbake: cooker.py: Don't dump the environment into the console log file 2012-11-01 11:46:21 +00:00
daemonize.py Apply some 2to3 transforms that don't cause issues in 2.6 2010-07-02 15:41:33 +01:00
data.py bitbake: lib/bb/data.py: improve output for expansion errors 2012-09-27 16:45:28 +01:00
data_smart.py bitbake: lib/bb/data.py: improve output for expansion errors 2012-09-27 16:45:28 +01:00
event.py bitbake: event/hob: Add a button for network tests in the proxy settings 2012-10-24 21:13:06 +01:00
exceptions.py bitbake/exceptions: Handle reports from the field of exception code failures 2012-05-25 11:15:12 +01:00
methodpool.py bitbake: methodpool: Clean up the parsed module list handling to be slightly less insane 2012-08-23 09:22:44 +01:00
monitordisk.py bitbake: monitordisk: fire event DISKFULL when terminate build 2012-08-02 15:28:39 +01:00
msg.py bitbake: implement BB_VERBOSE_LOGS 2012-02-28 13:47:10 +00:00
namedtuple_with_abc.py bb.namedtuple_with_abc: add useful util from activestate 2011-06-08 20:38:23 +01:00
persist_data.py persist_data: survive if sqlite3 couldn't enable the shared cache 2012-02-22 20:25:29 +00:00
process.py bitbake: process: Improve _logged_communicate buffering 2012-06-25 14:57:16 +01:00
providers.py bitbake: providers.py: Fix PREFERRED_VERSION containing epochs 2012-10-03 13:33:26 +01:00
runqueue.py bitbake: runqueue: Add --no-setscene to skip all setscene tasks 2012-09-24 15:35:31 +01:00
shell.py Introduce new param caches_array into Cache impl. 2011-06-07 22:39:52 +01:00
siggen.py bitbake: build/siggen: Add support for stamp 'clean' masks 2012-09-20 11:48:38 +01:00
taskdata.py bitbake: taskdata: Don't add dependencies on tasks that don't exist 2012-08-30 17:44:07 -07:00
tinfoil.py bitbake: tinfoil: Add file inadvertently not committed 2012-09-10 21:50:41 +01:00
utils.py bitbake: utils: Add explode_dep_versions2 to replace explode_dep_versions 2012-10-02 11:40:54 +01:00