mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-10 11:12:16 +03:00
minor line fixing
This commit is contained in:
parent
98784905dd
commit
613cb68df3
2 changed files with 3 additions and 26 deletions
|
@ -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()
|
||||
|
|
|
@ -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())
|
Loading…
Reference in a new issue