bd808 / python-iptools

A few useful functions and objects for manipulating ip addresses in python.
http://python-iptools.readthedocs.org/
BSD 2-Clause "Simplified" License
70 stars 17 forks source link

Avoid OverflowError with large ranges #13

Closed bd808 closed 10 years ago

bd808 commented 10 years ago

Use IpRange.__len__() directly rather than calling len(IpRange()) when computing the length of an IpRangeList. This won't stop OverflowErrors in calling code such as len(IpRangeList('fe80::/10')), but it will provide a method to work around the overflow by direct use of IpRangeList.__len__().

Resolves: #12