8000 bpo-30584: Fix test_os fails on non-English Windows (#1980) · python/cpython@897bba7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 897bba7

Browse files
denis-osipovvstinner
authored andcommitted
bpo-30584: Fix test_os fails on non-English Windows (#1980)
* Fix bpo-30584 * Adding a comment mentionning the bpo and explaining what is the identifier * Add Denis Osipov to Misc/ACKS
1 parent add98eb commit 897bba7

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
@@ -472,7 +472,9 @@ def test_access_denied(self):
472472
# force CreateFile to fail with ERROR_ACCESS_DENIED.
473473
DETACHED_PROCESS = 8
474474
subprocess.check_call(
475-
['icacls.exe', fname, '/deny', 'Users:(S)'],
475+
# bpo-30584: Use security identifier *S-1-5-32-545 instead
476+
# of localized "Users" to not depend on the locale.
477+
['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'],
476478
creationflags=DETACHED_PROCESS
477479
)
478480
result = os.stat(fname)

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,7 @@ William Orr
11321132
Michele Orrù
11331133
Tomáš Orsava
11341134
Oleg Oshmyan
1135+
Denis Osipov
11351136
Denis S. Otkidach
11361137
Peter Otten
11371138
Michael Otteneder

0 commit comments

Comments
 (0)
0