Esempio n. 1
0
File: grp.py Progetto: babble/babble
def getgrnam(name):
    """
    getgrnam(name) -> tuple
    Return the group database entry for the given group name.  If
    name is not valid, raise KeyError.
    """
    try:
        return struct_group(_posix.getgrnam(name))
    except NullPointerException:
        raise KeyError, name
Esempio n. 2
0
def getgrnam(name):
    """
    getgrnam(name) -> tuple
    Return the group database entry for the given group name.  If
    name is not valid, raise KeyError.
    """
    entry = _posix.getgrnam(name)
    if not entry:
        raise KeyError(name)
    return struct_group(entry)
Esempio n. 3
0
def getgrnam(name):
    """
    getgrnam(name) -> tuple
    Return the group database entry for the given group name.  If
    name is not valid, raise KeyError.
    """
    try:
        return struct_group(_posix.getgrnam(name))
    except NullPointerException:
        raise KeyError, name
Esempio n. 4
0
def getgrnam(name):
    """
    getgrnam(name) -> tuple
    Return the group database entry for the given group name.  If
    name is not valid, raise KeyError.
    """
    entry = _posix.getgrnam(name)
    if not entry:
        raise KeyError(name)
    return struct_group(entry)