]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: avoid TypeError in cleanup 41485/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 21 May 2021 03:34:18 +0000 (20:34 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 21 May 2021 19:12:07 +0000 (12:12 -0700)
Fixes: https://tracker.ceph.com/issues/50933
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/vstart_runner.py

index 5889f37577f26d20b5aafefa7b40fe35c59ace73..eaeba38dd94702241b34e2b7bbd61f0996a841e9 100644 (file)
@@ -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