예제 #1
0
파일: grp.py 프로젝트: alkorzt/pypy
def getgrnam(name):
    if not isinstance(name, str):
        raise TypeError("expected string")
    res = libc.getgrnam(name)
    if not res:
        raise KeyError(name)
    return _group_from_gstruct(res)
예제 #2
0
def getgrnam(name):
    if not isinstance(name, str):
        raise TypeError("expected string")
    res = libc.getgrnam(name)
    if not res:
        raise KeyError(name)
    return _group_from_gstruct(res)
예제 #3
0
def getgrnam(name):
    if not isinstance(name, str):
        raise TypeError("expected string")
    res = libc.getgrnam(os.fsencode(name))
    if not res:
        raise KeyError("'getgrnam(): name not found: %s'" % name)
    return _group_from_gstruct(res)
예제 #4
0
def getgrnam(name):
    if not isinstance(name, basestring):
        raise TypeError("expected string")
    name = str(name)
    res = libc.getgrnam(name)
    if not res:
        raise KeyError("'getgrnam(): name not found: %s'" % name)
    return _group_from_gstruct(res)
예제 #5
0
파일: grp.py 프로젝트: Alkalit/pypyjs
def getgrnam(name):
    if not isinstance(name, basestring):
        raise TypeError("expected string")
    name = str(name)
    res = libc.getgrnam(name)
    if not res:
        raise KeyError("'getgrnam(): name not found: %s'" % name)
    return _group_from_gstruct(res)
예제 #6
0
def getgrnam(gid):
    res = libc.getgrnam(gid)
    if not res:
        raise KeyError(gid)
    return _group_from_gstruct(res)