From 0fb246c3ec799eb18b9cbf267f24283d1dc88ca8 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 7 Nov 2019 06:02:55 -0500 Subject: testsuite: Fix Windows cleanup path This was a regression introduced with the Path refactoring. --- testsuite/driver/testlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuite/driver/testlib.py') diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 3ee9a8afdf..0b3d7a2f94 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -2312,11 +2312,11 @@ if config.msys: testdir = getTestOpts().testdir # type: Path max_attempts = 5 retries = max_attempts - def on_error(function, path, excinfo): + def on_error(function, path: str, excinfo): # At least one test (T11489) removes the write bit from a file it # produces. Windows refuses to delete read-only files with a # permission error. Try setting the write bit and try again. - path.chmod(stat.S_IWRITE) + Path(path).chmod(stat.S_IWRITE) function(path) # On Windows we have to retry the delete a couple of times. -- cgit v1.2.1