Ejemplo n.º 1
0
Archivo: grp.py Proyecto: babble/babble
def getgrgid(uid):
    """
    getgrgid(id) -> tuple
    Return the group database entry for the given numeric group ID.  If
    id is not valid, raise KeyError.
    """
    try:
        return struct_group(_posix.getgrgid(uid))
    except NullPointerException:
        raise KeyError, uid
Ejemplo n.º 2
0
def getgrgid(uid):
    """
    getgrgid(id) -> tuple
    Return the group database entry for the given numeric group ID.  If
    id is not valid, raise KeyError.
    """
    entry = _posix.getgrgid(uid)
    if not entry:
        raise KeyError(uid)
    return struct_group(entry)
Ejemplo n.º 3
0
def getgrgid(uid):
    """
    getgrgid(id) -> tuple
    Return the group database entry for the given numeric group ID.  If
    id is not valid, raise KeyError.
    """
    try:
        return struct_group(_posix.getgrgid(uid))
    except NullPointerException:
        raise KeyError, uid
Ejemplo n.º 4
0
def getgrgid(uid):
    """
    getgrgid(id) -> tuple
    Return the group database entry for the given numeric group ID.  If
    id is not valid, raise KeyError.
    """
    entry = _posix.getgrgid(uid)
    if not entry:
        raise KeyError(uid)
    return struct_group(entry)