equal
deleted
inserted
replaced
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 """ |