Mercurial > hg
changeset 41523:3ef8bec91465
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
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Sun, 03 Feb 2019 16:38:47 +0530 |
parents | d783c937aa53 |
children | 78d2583dd7cb |
files | mercurial/posix.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/posix.py Sun Feb 03 01:02:24 2019 +0530 +++ b/mercurial/posix.py Sun Feb 03 16:38:47 2019 +0530 @@ -583,8 +583,8 @@ """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),