From: Patrick Donnelly Date: Fri, 21 May 2021 03:34:18 +0000 (-0700) Subject: qa: avoid TypeError in cleanup X-Git-Tag: v14.2.22~12^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F41485%2Fhead;p=ceph.git qa: avoid TypeError in cleanup Fixes: https://tracker.ceph.com/issues/50933 Signed-off-by: Patrick Donnelly --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 5889f37577f..eaeba38dd94 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -918,7 +918,9 @@ class LocalContext(object): self.daemons.daemons[prefixed_type][svc_id] = LocalDaemon(svc_type, svc_id) def __del__(self): - shutil.rmtree(self.teuthology_config['test_path']) + path = self.teuthology_config['test_path'] + if path is not None: + shutil.rmtree(path) def exec_test(): # Parse arguments