diff options
Diffstat (limited to 'src/virtBootstrap/sources')
-rw-r--r-- | src/virtBootstrap/sources/docker_source.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/virtBootstrap/sources/docker_source.py b/src/virtBootstrap/sources/docker_source.py index 715e560..4281f55 100644 --- a/src/virtBootstrap/sources/docker_source.py +++ b/src/virtBootstrap/sources/docker_source.py @@ -107,7 +107,11 @@ class DockerSource(object): self.checksums.append([sum_type, layer_sum]) # Store checksums # Layers are tar files with hashsum used as name - file_path = os.path.join(self.images_dir, layer_sum + '.tar') + file_path = os.path.join(self.images_dir, layer_sum) + if not os.path.isfile(file_path): + file_path += '.tar' + if not os.path.isfile(file_path): + raise ValueError('Blob %s does not exist.' % file_path) # Store 'file path' and set placeholder for 'size' self.layers.append([file_path, None]) |