h0arry / ipaddr-py

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

2.0.x: IPv4Address has no .version #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
>>> import ipaddr
>>> ipaddr.IPv4Address('1.1.1.1').version
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "ipaddr.py", line 434, in version
    raise NotImplementedError('BaseIP has no version')
NotImplementedError: BaseIP has no version
>>> ipaddr.IPv4Address('1.1.1.1')._version
4
>>>

Changing class declaration from:

class IPv4Address(BaseIP, BaseV4):

to

class IPv4Address(BaseV4, BaseIP):

Fixes the problem and seems to be in line with how IPv6Address is declared.

Original issue reported on code.google.com by mattimus...@gmail.com on 17 Aug 2009 at 1:48

GoogleCodeExporter commented 9 years ago
fixed in r92

Original comment by pmo...@google.com on 17 Aug 2009 at 4:04