Skip to content

Instantly share code, notes, and snippets.

@ohrensessel
Created August 10, 2014 07:37
Show Gist options
  • Save ohrensessel/bb04ebe5505a035a44df to your computer and use it in GitHub Desktop.
Save ohrensessel/bb04ebe5505a035a44df to your computer and use it in GitHub Desktop.
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