We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ee9f58 commit 8cb7011Copy full SHA for 8cb7011
1 file changed
Lib/test/test_tarfile.py
@@ -3205,7 +3205,11 @@ def root_is_uid_gid_0():
3205
import pwd, grp
3206
except ImportError:
3207
return False
3208
- if pwd.getpwuid(0)[0] != 'root':
+ try:
3209
+ if pwd.getpwuid(0)[0] != 'root':
3210
+ return False
3211
+ except KeyError:
3212
+ # On Cygwin, there is no root user (uid 0)
3213
3214
if grp.getgrgid(0)[0] != 'root':
3215
0 commit comments