Exemplo n.º 1
0
def get_system_users():
    retlist = []
    rawlist = _psutil_bsd.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        nt = nt_user(user, tty or None, hostname, tstamp)
        retlist.append(nt)
    return retlist
Exemplo n.º 2
0
def get_system_users():
    retlist = []
    rawlist = _psutil_bsd.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        nt = nt_user(user, tty or None, hostname, tstamp)
        retlist.append(nt)
    return retlist
Exemplo n.º 3
0
def get_system_users():
    retlist = []
    rawlist = _psutil_bsd.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        abstty = os.path.join("/dev", tty)
        if os.path.exists(abstty):
            tty = abstty
        nt = ntuple_user(user, tty, hostname, tstamp)
        retlist.append(nt)
    return retlist
Exemplo n.º 4
0
def get_system_users():
    retlist = []
    rawlist = _psutil_bsd.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        abstty = os.path.join("/dev", tty)
        if os.path.exists(abstty):
            tty = abstty
        nt = ntuple_user(user, tty, hostname, tstamp)
        retlist.append(nt)
    return retlist