From dc70916ca4cf35cfd2ef5f57b10a629a73fc3554 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 2 Jan 2017 19:32:23 +0200 Subject: [PATCH] Catch permissionerrors too, since Windows seems to produce them occasionally. --- run_project_tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/run_project_tests.py b/run_project_tests.py index 07e7ddb65..e91fbb7ba 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -58,9 +58,10 @@ class AutoDeletedDir(): try: shutil.rmtree(self.dir) return - except OSError: + except (OSError, PermissionError): if i == retries - 1: - raise + mlog.warning('Could not delete temporary directory.') + return time.sleep(0.1 * (2**i)) failing_logs = []