shallowutil: fsdecode the bytes group name before passing to os
authorAugie Fackler <augie@google.com>
Wed, 16 Jan 2019 11:02:20 -0500
changeset 41258 a6b98c95bcf0
parent 41257 d08c816a11d3
child 41259 194e43c2bac9
shallowutil: fsdecode the bytes group name before passing to os Differential Revision: https://phab.mercurial-scm.org/D5608
hgext/remotefilelog/shallowutil.py
--- a/hgext/remotefilelog/shallowutil.py	Wed Jan 16 11:01:45 2019 -0500
+++ b/hgext/remotefilelog/shallowutil.py	Wed Jan 16 11:02:20 2019 -0500
@@ -420,7 +420,7 @@
 
 def getgid(groupname):
     try:
-        gid = grp.getgrnam(groupname).gr_gid
+        gid = grp.getgrnam(pycompat.fsdecode(groupname)).gr_gid
         return gid
     except KeyError:
         return None