summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/__init__.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-11 11:07:56 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-12 23:10:15 +0100
commit5c91537ab250e823b362bf5cc94760d26c6a4429 (patch)
tree3e992f843c3a739068b1e5d305356b708bc122bc /scripts/lib/devtool/__init__.py
parentd56caf3408d6200d51dff62eae51ffb137ae7393 (diff)
downloadpoky-5c91537ab250e823b362bf5cc94760d26c6a4429.tar.gz
devtool: return specific exit code for incompatible recipes
Certain recipes cannot be used with devtool extract / modify / upgrade - usually because they don't provide any source. Return a specific exit code (4) so that scripts such as scripts/contrib/devtool-stress.py know the difference between this and a genuine failure. (From OE-Core rev: ffd295fed4ab81fc0bd00bb145ef4d72c49584bf) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r--scripts/lib/devtool/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 77b1fd90a9..65eb4527bc 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -26,10 +26,11 @@ import re
26 26
27logger = logging.getLogger('devtool') 27logger = logging.getLogger('devtool')
28 28
29
30class DevtoolError(Exception): 29class DevtoolError(Exception):
31 """Exception for handling devtool errors""" 30 """Exception for handling devtool errors"""
32 pass 31 def __init__(self, message, exitcode=1):
32 super(DevtoolError, self).__init__(message)
33 self.exitcode = exitcode
33 34
34 35
35def exec_build_env_command(init_path, builddir, cmd, watch=False, **options): 36def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):