commit 382cb1d826958bb05d4a4cb92bc3a630c85b1ea2
parent f591c62eb342080bba77d8867865648b2af5a467
Author: Stefan Koch <programming@stefan-koch.name>
Date: Sun, 31 Jan 2021 11:52:33 +0100
fix exception on missing folder
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/aetherscale/computing.py b/aetherscale/computing.py
@@ -316,7 +316,10 @@ class ComputingHandler:
# once we delete the VM, we don't need its setup scripts anymore
resource_folder = resource_config_path(ResourceType.VM, vm_id)
- shutil.rmtree(resource_folder)
+ try:
+ shutil.rmtree(resource_folder)
+ except FileNotFoundError:
+ pass
yield {
'status': 'deleted',