blag / ipaddr-py

Automatically exported from code.google.com/p/ipaddr-py
0 stars 0 forks source link

IPv4network.supernet() returns new network with invalid repr #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

In [3]: ipaddr.IPv4Network("10.254.188.64/26").supernet()
Out[3]: IPv4Network('10.254.188.64/25')

In [4]: ipaddr.IPv4Network("10.254.188.64/26").supernet().network
Out[4]: IPv4Address('10.254.188.0')

In [5]: ipaddr.IPv4Network("10.254.188.64/26").supernet().prefixlen
Out[5]: 25

What is the expected output? What do you see instead?

The returned supernet should be displayed as "10.254.188.0/25"

What version of the product are you using? On what operating system?

ipaddr-2.1.10.tar.gz
Python 2.7.2 |EPD 7.3-1 (32-bit)| (default, Sep  7 2011, 09:16:50) 
MacOS 10.7.4

Original issue reported on code.google.com by bland...@google.com on 11 Jul 2012 at 10:21

GoogleCodeExporter commented 9 years ago
Also:

In [4]: str(ipaddr.IPv4Network("10.254.188.64/26").supernet())
Out[4]: '10.254.188.64/25'

Original comment by bland...@google.com on 11 Jul 2012 at 10:22