-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
The sorting functions at lines 112 and 113 fail for me, with a stack trace as follows:
Sorting hosts to targeting printers first, and laptops last
Traceback (most recent call last):
File "./nacker", line 156, in <module>
main(sys.argv)
File "./nacker", line 111, in main
hosts.sort(key = lambda host: host[1].oui.registration().org in PC_MANUFACTURERS)
File "./nacker", line 111, in <lambda>
hosts.sort(key = lambda host: host[1].oui.registration().org in PC_MANUFACTURERS)
File "/usr/lib/python2.7/dist-packages/netaddr/eui/__init__.py", line 464, in oui
return OUI(self.value >> 24)
File "/usr/lib/python2.7/dist-packages/netaddr/eui/__init__.py", line 121, in __init__
raise NotRegisteredError('OUI %r not registered!' % oui)
netaddr.core.NotRegisteredError: OUI 13164779 not registered!
Relevant code:
# Sort the MAC addresses based on organization, laptops and workstations
print('Sorting hosts to targeting printers first, and laptops last')
hosts.sort(key = lambda host: host[1].oui.registration().org in PC_MANUFACTURERS)
hosts.sort(key = lambda host: host[1].oui.registration().org in PRINTER_MANUFACTURERS, reverse=True)
(Running from an Ubuntu 14.04 machine.)
Metadata
Metadata
Assignees
Labels
No labels