Exemple #1
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
Exemple #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)
Exemple #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
Exemple #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)