diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/rawcopy.py')
| -rw-r--r-- | scripts/lib/wic/plugins/source/rawcopy.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py index c5c3be3c2e..561280977a 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py | |||
| @@ -17,8 +17,8 @@ | |||
| 17 | 17 | ||
| 18 | import logging | 18 | import logging |
| 19 | import os | 19 | import os |
| 20 | import sys | ||
| 21 | 20 | ||
| 21 | from wic.errors import WicError | ||
| 22 | from wic.pluginbase import SourcePlugin | 22 | from wic.pluginbase import SourcePlugin |
| 23 | from wic.utils.misc import exec_cmd, get_bitbake_var | 23 | from wic.utils.misc import exec_cmd, get_bitbake_var |
| 24 | from wic.filemap import sparse_copy | 24 | from wic.filemap import sparse_copy |
| @@ -62,14 +62,12 @@ class RawCopyPlugin(SourcePlugin): | |||
| 62 | if not bootimg_dir: | 62 | if not bootimg_dir: |
| 63 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | 63 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") |
| 64 | if not bootimg_dir: | 64 | if not bootimg_dir: |
| 65 | logger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") | 65 | raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting") |
| 66 | sys.exit(1) | ||
| 67 | 66 | ||
| 68 | logger.debug('Bootimg dir: %s', bootimg_dir) | 67 | logger.debug('Bootimg dir: %s', bootimg_dir) |
| 69 | 68 | ||
| 70 | if 'file' not in source_params: | 69 | if 'file' not in source_params: |
| 71 | logger.error("No file specified\n") | 70 | raise WicError("No file specified") |
| 72 | sys.exit(1) | ||
| 73 | 71 | ||
| 74 | src = os.path.join(bootimg_dir, source_params['file']) | 72 | src = os.path.join(bootimg_dir, source_params['file']) |
| 75 | dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno)) | 73 | dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno)) |
