summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWAMOTO Toshihiro <iwamoto@valinux.co.jp>2015-10-16 14:42:36 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-22 05:50:55 +0900
commitff66183243b31f2acce34e1a421f2bcddc9aba78 (patch)
tree0338e92c47d5aeec816291e814495305aa0b0b26
parentdc361d1a3b105d8647f42495b5d9848a0d5c6777 (diff)
Python3: use int instead of long
Using int for long int should not cause issues since python2.4. c.f. https://docs.python.org/2.6/whatsnew/2.4.html#pep-237-unifying-long-integers-and-integers Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/services/protocols/bgp/utils/bgp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ryu/services/protocols/bgp/utils/bgp.py b/ryu/services/protocols/bgp/utils/bgp.py
index 3ba87f94..28e010a2 100644
--- a/ryu/services/protocols/bgp/utils/bgp.py
+++ b/ryu/services/protocols/bgp/utils/bgp.py
@@ -94,7 +94,7 @@ def from_inet_ptoi(bgp_id):
four_byte_id = None
try:
packed_byte = socket.inet_pton(socket.AF_INET, bgp_id)
- four_byte_id = long(packed_byte.encode('hex'), 16)
+ four_byte_id = int(packed_byte.encode('hex'), 16)
except ValueError:
LOG.debug('Invalid bgp id given for conversion to integer value %s',
bgp_id)