]> granicus.if.org Git - python/commitdiff
bpo-30584: Fix test_os fails on non-English Windows (#1980)
authorDenis Osipov <osipov_d@list.ru>
Wed, 7 Jun 2017 17:15:26 +0000 (22:15 +0500)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 7 Jun 2017 17:15:26 +0000 (19:15 +0200)
* Fix bpo-30584

* Adding a comment mentionning the bpo and explaining what is the identifier

* Add Denis Osipov to Misc/ACKS

Lib/test/test_os.py
Misc/ACKS

index 746b3f8be8e0bfc2d11fd8fd8ea8717dcf33514e..4a21ff762dcaa1e842347a88e852fa68e44a2f8b 100644 (file)
@@ -472,7 +472,9 @@ class StatAttributeTests(unittest.TestCase):
         # force CreateFile to fail with ERROR_ACCESS_DENIED.
         DETACHED_PROCESS = 8
         subprocess.check_call(
-            ['icacls.exe', fname, '/deny', 'Users:(S)'],
+            # bpo-30584: Use security identifier *S-1-5-32-545 instead
+            # of localized "Users" to not depend on the locale.
+            ['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'],
             creationflags=DETACHED_PROCESS
         )
         result = os.stat(fname)
index 8a5bf6ebb183eda308e97341d4546190e2cf5c81..135491d764d8565102a6c5088d4fea928983a25b 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1132,6 +1132,7 @@ William Orr
 Michele Orrù
 Tomáš Orsava
 Oleg Oshmyan
+Denis Osipov
 Denis S. Otkidach
 Peter Otten
 Michael Otteneder