diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-01-27 10:02:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-03 14:53:51 +0000 |
commit | ca232b5c7b4647ac3d79cc6a6dacdf12e1ba1913 (patch) | |
tree | 1b2d131791c48d7dcc82a50accd1f7950fee85cb /meta | |
parent | 26e5b0f7b9a52d6eed7d46c003c45b202acabebc (diff) | |
download | poky-ca232b5c7b4647ac3d79cc6a6dacdf12e1ba1913.tar.gz |
lib/oe/image.py: add error checking for missing IMAGE_CMD
An invalid value in IMAGE_FSTYPES was triggering a traceback. Add a
check and a reasonable error message instead.
(From OE-Core rev: f38c35b925d6eab0d5a41b8592b0eb8b0a3b7b72)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/image.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py index f9c8f84cf8..0ce303d570 100644 --- a/meta/lib/oe/image.py +++ b/meta/lib/oe/image.py | |||
@@ -296,7 +296,11 @@ class Image(ImageDepGraph): | |||
296 | bb.data.update_data(localdata) | 296 | bb.data.update_data(localdata) |
297 | localdata.setVar('type', type) | 297 | localdata.setVar('type', type) |
298 | 298 | ||
299 | cmds.append("\t" + localdata.getVar("IMAGE_CMD", True)) | 299 | image_cmd = localdata.getVar("IMAGE_CMD", True) |
300 | if image_cmd: | ||
301 | cmds.append("\t" + image_cmd) | ||
302 | else: | ||
303 | bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % type) | ||
300 | cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}")) | 304 | cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}")) |
301 | 305 | ||
302 | if type in cimages: | 306 | if type in cimages: |