diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/virtBootstrap/sources.py | 7 | ||||
-rwxr-xr-x | src/virtBootstrap/virt_bootstrap.py | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/virtBootstrap/sources.py b/src/virtBootstrap/sources.py index fd8e666..cef0623 100644 --- a/src/virtBootstrap/sources.py +++ b/src/virtBootstrap/sources.py @@ -126,6 +126,9 @@ def get_mime_type(path): def create_qcow2(tar_file, layer_file, backing_file=None, size=DEF_QCOW2_SIZE): + """ + Create qcow2 image from tarball. + """ qemu_img_cmd = ["qemu-img", "create", "-f", "qcow2", layer_file, size] if not backing_file: @@ -182,8 +185,8 @@ def extract_layers_in_qcow2(layers_list, image_dir, dest_dir): logging.info("Extracting layer (%s/%s)", index+1, len(layers_list)) # Get layer file information - sum_type, sum_value, tar_file = \ - get_layer_info(layer['digest'], image_dir) + sum_type, sum_value, tar_file = get_layer_info(layer['digest'], + image_dir) logging.debug('Untar layer file: (%s) %s', sum_type, tar_file) diff --git a/src/virtBootstrap/virt_bootstrap.py b/src/virtBootstrap/virt_bootstrap.py index 1befaae..bef5e88 100755 --- a/src/virtBootstrap/virt_bootstrap.py +++ b/src/virtBootstrap/virt_bootstrap.py @@ -93,7 +93,7 @@ def bootstrap(args): source = get_source(args) if not os.path.exists(args.dest): os.makedirs(args.dest) - elif not os.path.isdir(args.dest): # Show error if not directory + elif not os.path.isdir(args.dest): # Show error if not directory error("Destination path '%s' is not directory.", args.dest) sys.exit(1) |