tehmaze/ipcalc — pull request #11 by twinshadow (2012-05-30 22:24:18+00:00)
Title: IPv6 address hextets that are 0 fail without the "<=" operator.

Verified with the IPv6 address example in the README file.

>>> subnet = ipcalc.Network('2001:beef:babe::/48')
Traceback (most recent call last):
File "", line 1, in
File "ipcalc.py", line 163, in __init__
self.ip = self._dqtoi(ip)
File "ipcalc.py", line 289, in _dqtoi
raise ValueError, "%r: IPv6 address invalid: hextets should be between 0x0000 and 0xffff" % dq
ValueError: '2001:beef:babe::': IPv6 address invalid: hextets should be between 0x0000 and 0xffff