diff options
author | Nils Schneider <nils@nilsschneider.net> | 2014-06-29 11:20:56 +0200 |
---|---|---|
committer | Nils Schneider <nils@nilsschneider.net> | 2014-06-29 11:20:56 +0200 |
commit | 56b884b810f11d61d9e6305548d68dd311b2823e (patch) | |
tree | 304e9ec4cfd58e62bc92f3c02c4f9555f7d5a4b5 | |
parent | 0ab4ce6e2bc2a136ef71584781fa1ceaa4359d3b (diff) |
remove dead code
-rw-r--r-- | hostid.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/hostid.py b/hostid.py deleted file mode 100644 index 2b4038e..0000000 --- a/hostid.py +++ /dev/null @@ -1,13 +0,0 @@ -import re -from functools import reduce - -def mac_to_hostid(mac): - int_mac = list(map(lambda x: int(x, 16), mac.split(":"))) - int_mac[0] ^= 2 - bytes = map(lambda x: "%02x" % x, int_mac[0:3] + [0xff, 0xfe] + int_mac[3:]) - return reduce(lambda a, i: - [a[0] + ("" if i == 0 else ":") + a[1] + a[2]] + a[3:], - range(0, 4), - [""] + list(bytes) - ) - |