added utility to make macs loggable
This commit is contained in:
1 parent
e0c7ada147
commit
43be1e1dbe
10 files changed
+57
-42
No files matched your search
@@ -0,0 +1,12 @@
|
||||
"""Tools."""
|
||||
|
||||
def mac_loggable(mac: str) -> str:
|
||||
"""Remove parts of the mac address for logging."""
|
||||
splitted = mac.split(":")
|
||||
return "XX:XX:XX:XX:XX:" + splitted[-1]
|
||||
|
||||
def unique_id_loggable(unique_id: str) -> str:
|
||||
"""Remove parts of the unique id for logging."""
|
||||
splitted = unique_id.split("_", maxsplit=1)
|
||||
serial = splitted[0][:6]
|
||||
return serial + "XXXXXXXXXX" + splitted[1]
|
||||
Reference in new issue
Block a user