blob: 202b3fc7474c6f45afa830e59fa0b9d1c84d1ed5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--- ipaddr.py.orig 2014-01-31 21:22:32 UTC
+++ ipaddr.py
@@ -25,6 +25,11 @@ and networks.
__version__ = '2.1.11'
import struct
+import sys
+
+if sys.version_info > (3,):
+ long = int
+ xrange = range
IPV4LENGTH = 32
IPV6LENGTH = 128
@@ -1447,7 +1452,7 @@ class _BaseV6(object):
try:
# Now, parse the hextets into a 128-bit integer.
- ip_int = 0L
+ ip_int = long(0)
for i in xrange(parts_hi):
ip_int <<= 16
ip_int |= self._parse_hextet(parts[i])
|