コード例 #1
0
ファイル: grp.py プロジェクト: 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
コード例 #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)
コード例 #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
コード例 #4
0
ファイル: grp.py プロジェクト: 343829084/OpenRefine
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)