https://github.com/python/cpython/commit/82acc5f2113bffd0ed902851f4ccf5b9be8980b2
commit: 82acc5f2113bffd0ed902851f4ccf5b9be8980b2
branch: main
author: Steve Dower <[email protected]>
committer: zooba <[email protected]>
date: 2024-05-09T13:59:18+01:00
summary:

gh-118802: Fix ACL use in test for non-English Windows (GH-118831)

files:
M Lib/test/test_os.py

diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 9c9c8536dc7542..9088318600f4c0 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -3226,9 +3226,8 @@ def test_stat_inaccessible_file(self):
             self.skipTest("Unable to create inaccessible file")
 
         def cleanup():
-            # Give delete permission. We are the file owner, so we can do this
-            # even though we removed all permissions earlier.
-            subprocess.check_output([ICACLS, filename, "/grant", 
"Everyone:(D)"],
+            # Give delete permission to the owner (us)
+            subprocess.check_output([ICACLS, filename, "/grant", "*WD:(D)"],
                                     stderr=subprocess.STDOUT)
             os.unlink(filename)
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to