py3: pass str into grp.getgrnam
authorPulkit Goyal <pulkit@yandex-team.ru>
Sat, 02 Feb 2019 04:49:42 +0530
changeset 41504 587a3c976892
parent 41503 210a999bd668
child 41505 dffd6a301570
py3: pass str into grp.getgrnam grp.getgrnam expects str on Python 3. This fixes test-acl.t on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5794
contrib/python3-whitelist
mercurial/posix.py
--- a/contrib/python3-whitelist	Wed Jan 30 03:50:31 2019 +0530
+++ b/contrib/python3-whitelist	Sat Feb 02 04:49:42 2019 +0530
@@ -5,6 +5,7 @@
 test-absorb-rename.t
 test-absorb-strip.t
 test-absorb.t
+test-acl.t
 test-add.t
 test-addremove-similar.t
 test-addremove.t
--- a/mercurial/posix.py	Wed Jan 30 03:50:31 2019 +0530
+++ b/mercurial/posix.py	Sat Feb 02 04:49:42 2019 +0530
@@ -583,6 +583,7 @@
     """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)
 
 def spawndetached(args):