Don't fail if image dir doesn't exist during build cleanup

This commit is contained in:
Disassembler 2019-11-30 16:17:20 +01:00
parent c22d2c7393
commit c71817c2e8
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

View File

@ -151,7 +151,10 @@ class ImageBuilder:
def clean(self): def clean(self):
lxcmgr.destroy_container(self.image.name) lxcmgr.destroy_container(self.image.name)
shutil.rmtree(self.get_layer_path(self.image.name)) try:
shutil.rmtree(self.get_layer_path(self.image.name))
except FileNotFoundError:
pass
def unpack_http_archive(src, dst): def unpack_http_archive(src, dst):
# Decompress an archive downloaded via http(s) # Decompress an archive downloaded via http(s)