[dts] [PATCH] framework/utils: fix issue of mac conversion.

Lijuan Tu lijuan.tu at intel.com
Fri Feb 14 19:33:55 CET 2020


snice hex(mac_long) is 0x5212345678, we need "5212345678".

Signed-off-by: Lijuan Tu <lijuan.tu at intel.com>
---
 framework/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/utils.py b/framework/utils.py
index f6594b5..e74e6c5 100644
--- a/framework/utils.py
+++ b/framework/utils.py
@@ -256,7 +256,7 @@ def convert_mac2str(mac_long):
     """
     convert the MAC type from the int into the string.
     """
-    mac = hex(mac_long)[2:-1].zfill(12)
+    mac = hex(mac_long)[2:].zfill(12)
     b = []
     [b.append(mac[n:n+2]) for n in range(len(mac)) if n % 2 == 0 ]
     new_mac = ":".join(b)
-- 
1.8.3.1



More information about the dts mailing list