summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-07 06:02:55 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-09 18:03:37 -0500
commit0fb246c3ec799eb18b9cbf267f24283d1dc88ca8 (patch)
tree82b6bf378cd9f9ca728062f404359b4a026c1605 /testsuite/driver/testlib.py
parentd7de0d81924c7475b14f87a9427497b318653e91 (diff)
downloadhaskell-0fb246c3ec799eb18b9cbf267f24283d1dc88ca8.tar.gz
testsuite: Fix Windows cleanup path
This was a regression introduced with the Path refactoring.
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py4
1 files changed, 2 insertions, 2 deletions
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.