From 5745ed4753ac1ec55006b30dc8052a210f98284e Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 7 May 2024 17:14:18 +0200 Subject: [PATCH] common: only try to delete .testfiles dir if it exists Otherwise, some tests fail with an error. --- tests/common.TestCase | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/common.TestCase b/tests/common.TestCase index 5d3b5cdb..48e668fc 100755 --- a/tests/common.TestCase +++ b/tests/common.TestCase @@ -77,7 +77,8 @@ class CommonTest(unittest.TestCase): fdroidserver.common.options = None os.chdir(self.basedir) self._td.cleanup() - shutil.rmtree(self.tmpdir) + if os.path.exists(self.tmpdir): + shutil.rmtree(self.tmpdir) def test_parse_human_readable_size(self): for k, v in (