Ensure that the workspace deletion doesn't fail with file not found.

This commit is contained in:
Chris MacNaughton
2020-08-20 17:08:33 +02:00
parent f9247c5bff
commit 6a18a37c13
+1 -1
View File
@@ -47,7 +47,7 @@ def destroy_workspace(workspace_name, workspace_path):
try:
subprocess.check_call(['tempest', 'workspace', 'remove', '--rmdir',
'--name', workspace_name])
except subprocess.CalledProcessError:
except (subprocess.CalledProcessError, FileNotFoundError):
pass
if os.path.isdir(workspace_path):
shutil.rmtree(workspace_path)