diff --git a/opt/ahenk/base/system/system.py b/opt/ahenk/base/system/system.py index 043663e..dd20e21 100644 --- a/opt/ahenk/base/system/system.py +++ b/opt/ahenk/base/system/system.py @@ -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() diff --git a/opt/ahenk/base/util/util.py b/opt/ahenk/base/util/util.py index ca75a72..7a7bc68 100644 --- a/opt/ahenk/base/util/util.py +++ b/opt/ahenk/base/util/util.py @@ -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()) \ No newline at end of file