grp.getgrnam expects str on Python 3.
This fixes test-acl.t on Python 3.
hg-reviewers |
grp.getgrnam expects str on Python 3.
This fixes test-acl.t on Python 3.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
+ name = pycompat.sysstr(name)
return list(grp.getgrnam(name).gr_mem)
Perhaps, it should be fsdecode() since they appear to abuse
PyUnicode_EncodeFSDefault() to get back bytes.
And we'll probably need to fsencode() gr_mem back to bytes as well.
Ugh, Python. And the raw system call accepts a char *. So this whole "pretend to be Unicode" is just plain silly.