# HG changeset patch # User Pulkit Goyal # Date 2019-02-03 11:08:47 # Node ID 3ef8bec91465a31fcb3f82e893e01826c26bd275 # Parent d783c937aa53e193d1c5263a3db7084503640087 py3: do a fsdecode(), fsencode() dance in posix.py We have to use `fsdecode()` instead of sysstr() because they are abusing `PyUnicode_EncodeFSDefault()` to get back bytes. Differential Revision: https://phab.mercurial-scm.org/D5808 diff --git a/mercurial/posix.py b/mercurial/posix.py --- a/mercurial/posix.py +++ b/mercurial/posix.py @@ -583,8 +583,8 @@ def groupmembers(name): """Return the list of members of the group with the given name, KeyError if the group does not exist. """ - name = pycompat.sysstr(name) - return list(grp.getgrnam(name).gr_mem) + name = pycompat.fsdecode(name) + return pycompat.rapply(pycompat.fsencode, list(grp.getgrnam(name).gr_mem)) def spawndetached(args): return os.spawnvp(os.P_NOWAIT | getattr(os, 'P_DETACH', 0),