From 613cb68df3a7e078e7ca7bc03e10ff71efbaa06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Wed, 22 Jun 2016 18:10:16 +0300 Subject: [PATCH] minor line fixing --- opt/ahenk/base/system/system.py | 27 ++------------------------- opt/ahenk/base/util/util.py | 2 +- 2 files changed, 3 insertions(+), 26 deletions(-) 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