Fix OSError in tmpdir on emscripten due to missing getuid()
Fixes #10765
This commit is contained in:
parent
9ccae9a8e3
commit
c237297b3d
|
@ -0,0 +1 @@
|
|||
Fix temp_path fixture always raising OSError on emscripten due to missing getuid
|
|
@ -176,7 +176,7 @@ class TempPathFactory:
|
|||
# Also, to keep things private, fixup any world-readable temp
|
||||
# rootdir's permissions. Historically 0o755 was used, so we can't
|
||||
# just error out on this, at least for a while.
|
||||
if sys.platform != "win32":
|
||||
if sys.platform != "win32" and sys.platform != "emscripten":
|
||||
uid = os.getuid()
|
||||
rootdir_stat = rootdir.stat()
|
||||
# getuid shouldn't fail, but cpython defines such a case.
|
||||
|
|
Loading…
Reference in New Issue