drkjam/netaddr — pull request #24 by pvaret (2012-05-24 11:33:06+00:00)
Title: Fixed TypeError when comparing BaseIP instances with non-BaseIP objects.

Hello,

Netaddr crashes when comparing a BaseIP instance with an object that bears a non-callable .key attribute.

This can be trivially fixed by returning NotImplemented when the comparison with other.key() raises a TypeError exception. Here's a proposed implementation of this fix.