From e1ed3ab1637e8c80240c0f797ac5ee04030f509a Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 15 Jan 2016 20:10:09 +0200 Subject: [PATCH] Use rmtree in the retry mechanism --- tests/functional/openlp_core_utils/test_db.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/functional/openlp_core_utils/test_db.py b/tests/functional/openlp_core_utils/test_db.py index 6575f4875..1e84325e3 100644 --- a/tests/functional/openlp_core_utils/test_db.py +++ b/tests/functional/openlp_core_utils/test_db.py @@ -60,12 +60,13 @@ class TestUtilsDBFunctions(TestCase): retries = 0 while retries < 5: try: - os.unlink(self.db_tmp_path) + shutil.rmtree(self.tmp_folder) + # os.unlink(self.db_tmp_path) break - except: + except Exception as e: time.sleep(1) retries += 1 - shutil.rmtree(self.tmp_folder) + print(e) def delete_column_test(self): """