[Bug 923831] Review Request: python-ipaddress - Port of the python 3.3+ ipaddress module to 2.6 and 2.7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=923831



--- Comment #4 from Sergio Pascual <sergio.pasra@xxxxxxxxx> ---
(In reply to Volker Fröhlich from comment #3)
> http://docs.python.org/dev/library/ipaddress
> 
> >>> import ipaddress
> >>> ipaddress.ip_address('192.168.0.1')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.7/site-packages/ipaddress.py", line 105, in
> ip_address
>     address)
> ValueError: '192.168.0.1' does not appear to be an IPv4 or IPv6 address

Try this instead

>>> import ipaddress
>>> ipaddress.ip_address(u'192.168.0.1')
IPv4Address(u'192.168.0.1')

the module expects unicode

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]