What steps will reproduce the problem?
1. ip_obj = ipaddr.IPAddress('192.168.01.131')
2.
3.
What is the expected output? What do you see instead?
an Exception occurence
an instance which implies a valid ip address
What version of the product are you using? On what operating system?
version : '2.1.9' on linux
Please provide any additional information below.
I have tested the modification in:
def _is_valid_ip(self, address):
...........
for octet in octets:
try:
if not 0 <= int(octet) <= 255:
return False
# < additional control
if len(octet) > 1:
if octet[0] == '0':
return False
# additional control >
except ValueError:
return False
return True
..........
Original issue reported on code.google.com by jeanyves...@gmail.com on 15 Feb 2012 at 12:57
Original issue reported on code.google.com by
jeanyves...@gmail.com
on 15 Feb 2012 at 12:57