aboutsummaryrefslogtreecommitdiffstats
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:04 +0100
commitffd295fed4ab81fc0bd00bb145ef4d72c49584bf (patch)
treef375bbc94f9407bf2f4618e6b82dfedc8909562e /scripts/lib/devtool/__init__.py
parent47822a2aff56fd338c16b5ad756feda9f395a8a1 (diff)
downloadopenembedded-core-contrib-ffd295fed4ab81fc0bd00bb145ef4d72c49584bf.tar.gz
openembedded-core-contrib-ffd295fed4ab81fc0bd00bb145ef4d72c49584bf.tar.bz2
openembedded-core-contrib-ffd295fed4ab81fc0bd00bb145ef4d72c49584bf.zip
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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
logger = logging.getLogger('devtool')
-
class DevtoolError(Exception):
"""Exception for handling devtool errors"""
- pass
+ def __init__(self, message, exitcode=1):
+ super(DevtoolError, self).__init__(message)
+ self.exitcode = exitcode
def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):