Closed hasegeli closed 8 years ago
Thank you for the report. The failing code is the inner ip_address('1.1.1.1')
- the problem is unrelated to the outer construction. The code fails because by default '1.1.1.1' is a bytes object in Python 2. The bytes representation of ip_addresses is packed, and
b'1.1.1.1'` is not a valid packed representation (luckily, or you'd get something completely different).
Either add from __future__ import unicode_literals
to your code (that is the default and only behavior in Python 3), or add a u
before the string literal, as in ip_address(u'1.1.1.1')
.