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
from uuid import getnode as get_mac
"""
some functions closed because of dependency management
"""
class System:
class Ahenk(object):
@ -191,21 +187,13 @@ class System:
def user_details():
return psutil.users()
@staticmethod
def last_login_username():
# TODO
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):
@staticmethod
@ -349,17 +337,6 @@ class System:
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
def interfaces_details():
return psutil.net_if_addrs()

View File

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