New issue 58 by drkjam: IPSet operations should accept the same arguments
as IPAddress
http://code.google.com/p/netaddr/issues/detail?id=58
*Raised by Stefan Nordhausen via email*
What steps will reproduce the problem?
>>> from netaddr import *
>>> x=IPSet()
>>> x.add(1234)
What is the expected output?
IPSet(['0.0.4.210/32'])
What do you see instead?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib64/python2.6/site-packages/netaddr/ip/sets.py", line
111, in add
self._cidrs[IPNetwork(ip)] = True
File "/usr/local/lib64/python2.6/site-packages/netaddr/ip/__init__.py",
line 687, in __init__
prefix, suffix = addr.split('/')
AttributeError: 'int' object has no attribute 'split'
Is there a workaround?
>>> x.add(IPAddress(1234))
What version of the product are you using?
netaddr 0.7.3
On what operating system?
Linux 64-bit
Please provide any additional information below.
I think the IPSet should accept everything that IPAddress accepts.
Comment #1 on issue 58 by drkjam: IPSet operations should accept the same
arguments as IPAddress
http://code.google.com/p/netaddr/issues/detail?id=58
(No comment was entered for this change.)