def name_to_gid(name):
    try:
        gid = int(name)
    except __HOLE__:
        try:
            pwrec = grp.getgrnam(name)
        except KeyError:
            return None
        gid = pwrec[2]
    else:
        try:
            pwrec = grp.getgrgid(gid)
        except KeyError:
            return None
    return gid
dataset/ETHPy150Open XiaoMi/minos/supervisor/supervisor/datatypes.py/name_to_gid