diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/fsimage.py')
-rw-r--r-- | scripts/lib/wic/plugins/source/fsimage.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/lib/wic/plugins/source/fsimage.py b/scripts/lib/wic/plugins/source/fsimage.py index 9193892ae1..35fb78b832 100644 --- a/scripts/lib/wic/plugins/source/fsimage.py +++ b/scripts/lib/wic/plugins/source/fsimage.py | |||
@@ -15,12 +15,15 @@ | |||
15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
16 | # | 16 | # |
17 | 17 | ||
18 | import logging | ||
18 | import os | 19 | import os |
20 | import sys | ||
19 | 21 | ||
20 | from wic import msger | ||
21 | from wic.pluginbase import SourcePlugin | 22 | from wic.pluginbase import SourcePlugin |
22 | from wic.utils.misc import get_bitbake_var | 23 | from wic.utils.misc import get_bitbake_var |
23 | 24 | ||
25 | logger = logging.getLogger('wic') | ||
26 | |||
24 | class FSImagePlugin(SourcePlugin): | 27 | class FSImagePlugin(SourcePlugin): |
25 | """ | 28 | """ |
26 | Add an already existing filesystem image to the partition layout. | 29 | Add an already existing filesystem image to the partition layout. |
@@ -58,16 +61,17 @@ class FSImagePlugin(SourcePlugin): | |||
58 | if not bootimg_dir: | 61 | if not bootimg_dir: |
59 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | 62 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") |
60 | if not bootimg_dir: | 63 | if not bootimg_dir: |
61 | msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") | 64 | logger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") |
65 | sys.exit(1) | ||
62 | 66 | ||
63 | msger.debug('Bootimg dir: %s' % bootimg_dir) | 67 | logger.debug('Bootimg dir: %s', bootimg_dir) |
64 | 68 | ||
65 | if 'file' not in source_params: | 69 | if 'file' not in source_params: |
66 | msger.error("No file specified\n") | 70 | logger.error("No file specified\n") |
67 | return | 71 | sys.exit(1) |
68 | 72 | ||
69 | src = os.path.join(bootimg_dir, source_params['file']) | 73 | src = os.path.join(bootimg_dir, source_params['file']) |
70 | 74 | ||
71 | 75 | ||
72 | msger.debug('Preparing partition using image %s' % (src)) | 76 | logger.debug('Preparing partition using image %s', src) |
73 | part.prepare_rootfs_from_fs_image(cr_workdir, src, "") | 77 | part.prepare_rootfs_from_fs_image(cr_workdir, src, "") |