Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-40014: Skip os.getgrouplist related test if OSError is raised. #19075

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Lib/test/pythoninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,13 @@ def collect_pwd(info_add):
return

if hasattr(os, 'getgrouplist'):
groups = os.getgrouplist(entry.pw_name, entry.pw_gid)
groups = ', '.join(map(str, groups))
info_add('os.getgrouplist', groups)
try:
groups = os.getgrouplist(entry.pw_name, entry.pw_gid)
groups = ', '.join(map(str, groups))
except OSError:
pass
else:
info_add('os.getgrouplist', groups)


def collect_readline(info_add):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Skip adding :func:`~os.getgrouplist` information during pythoninfo test. if
:exc:`OSError` is raised. Patch by Dong-hee Na.
corona10 marked this conversation as resolved.
Show resolved Hide resolved