From 114a44c22353b2d15a4c8b3aa290a1dadc4b55a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Mon, 16 May 2016 17:27:51 +0300 Subject: [PATCH] mac addresses added to system --- opt/ahenk/base/system/system.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opt/ahenk/base/system/system.py b/opt/ahenk/base/system/system.py index 13b23d4..772c1a1 100644 --- a/opt/ahenk/base/system/system.py +++ b/opt/ahenk/base/system/system.py @@ -4,6 +4,7 @@ import platform import psutil +from uuid import getnode as get_mac class System: @@ -142,6 +143,10 @@ class System: class Hardware(object): + @staticmethod + def mac_address(): + return str(':'.join(("%012X" % get_mac())[i:i + 2] for i in range(0, 12, 2))) + class Memory(object): @staticmethod