From ff66183243b31f2acce34e1a421f2bcddc9aba78 Mon Sep 17 00:00:00 2001 From: IWAMOTO Toshihiro Date: Fri, 16 Oct 2015 14:42:36 +0900 Subject: [PATCH] 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 Signed-off-by: FUJITA Tomonori --- ryu/services/protocols/bgp/utils/bgp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)