minor line fixing

This commit is contained in:
Volkan Şahin 2016-06-22 18:10:16 +03:00
parent 98784905dd
commit 613cb68df3
2 changed files with 3 additions and 26 deletions

View file

@ -13,10 +13,6 @@ import fcntl
import struct import struct
from uuid import getnode as get_mac from uuid import getnode as get_mac
"""
some functions closed because of dependency management
"""
class System: class System:
class Ahenk(object): class Ahenk(object):
@ -191,21 +187,13 @@ class System:
def user_details(): def user_details():
return psutil.users() return psutil.users()
@staticmethod @staticmethod
def last_login_username(): def last_login_username():
# TODO # TODO
pass pass
"""
@staticmethod
def user_name():
arr = []
for user in psutil.get_users():
if str(user[0]) is not 'None' and user[0] not in arr:
arr.append(user[0])
return arr
"""
class Os(object): class Os(object):
@staticmethod @staticmethod
@ -349,17 +337,6 @@ class System:
return arr return arr
"""
@staticmethod
def mac_addresses():
arr=[]
for iface in psutil.net_io_counters(pernic=True):
mac = open('/sys/class/net/' + iface + '/address').readline()
if str(mac[0:17]) != "00:00:00:00:00:00":
arr.append(mac[0:17])
return arr
"""
@staticmethod @staticmethod
def interfaces_details(): def interfaces_details():
return psutil.net_if_addrs() return psutil.net_if_addrs()

View file

@ -225,4 +225,4 @@ class Util:
with open(fname, 'rb') as f: with open(fname, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b""): for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk) hash_md5.update(chunk)
return str(hash_md5.hexdigest()) return str(hash_md5.hexdigest())