Skip to content

Commit ca1b66f

Browse files
denis-osipovvstinner
authored andcommitted
[3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)
* Fix bpo-30584 * Adding a comment mentionning the bpo and explaining what is the identifier * Add Denis Osipov to Misc/ACKS (cherry picked from commit 897bba7)
1 parent 854f7ba commit ca1b66f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/test/test_os.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,9 @@ def test_access_denied(self):
473473
# force CreateFile to fail with ERROR_ACCESS_DENIED.
474474
DETACHED_PROCESS = 8
475475
subprocess.check_call(
476-
['icacls.exe', fname, '/deny', 'Users:(S)'],
476+
# bpo-30584: Use security identifier *S-1-5-32-545 instead
477+
# of localized "Users" to not depend on the locale.
478+
['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'],
477479
creationflags=DETACHED_PROCESS
478480
)
479481
result = os.stat(fname)

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,7 @@ William Orr
11211121
Michele Orrù
11221122
Tomáš Orsava
11231123
Oleg Oshmyan
1124+
Denis Osipov
11241125
Denis S. Otkidach
11251126
Peter Otten
11261127
Michael Otteneder

0 commit comments

Comments
 (0)