mercurial/posix.py
changeset 41832 faa04f45b5fe
parent 41537 3ef8bec91465
child 42189 97ada9b8d51b
equal deleted inserted replaced
41831:867883d454ea 41832:faa04f45b5fe
   573     If gid is None, return the name of the current group."""
   573     If gid is None, return the name of the current group."""
   574 
   574 
   575     if gid is None:
   575     if gid is None:
   576         gid = os.getgid()
   576         gid = os.getgid()
   577     try:
   577     try:
   578         return grp.getgrgid(gid)[0]
   578         return pycompat.fsencode(grp.getgrgid(gid)[0])
   579     except KeyError:
   579     except KeyError:
   580         return str(gid)
   580         return pycompat.bytestr(gid)
   581 
   581 
   582 def groupmembers(name):
   582 def groupmembers(name):
   583     """Return the list of members of the group with the given
   583     """Return the list of members of the group with the given
   584     name, KeyError if the group does not exist.
   584     name, KeyError if the group does not exist.
   585     """
   585     """