From 6a18a37c13bec181375ffa541d1a396652f9431b Mon Sep 17 00:00:00 2001 From: Chris MacNaughton Date: Thu, 20 Aug 2020 17:08:33 +0200 Subject: [PATCH] Ensure that the workspace deletion doesn't fail with file not found. --- zaza/openstack/charm_tests/tempest/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/tempest/utils.py b/zaza/openstack/charm_tests/tempest/utils.py index 8f3aea7..52ae126 100644 --- a/zaza/openstack/charm_tests/tempest/utils.py +++ b/zaza/openstack/charm_tests/tempest/utils.py @@ -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)