Created
August 10, 2014 07:37
-
-
Save ohrensessel/bb04ebe5505a035a44df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def maybe_node_by_fuzzy_mac(self, mac): | |
mac_a = mac.lower() | |
for node in self._nodes: | |
if 'legacy' in node.flags and node.flags['legagcy'] == True: | |
for mac_b in node.macs: | |
if is_derived_mac(mac_a, mac_b): | |
return node | |
raise KeyError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment