From 50ad776a32ca5c8df1362d41014333e47770058c Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 28 Sep 2015 22:11:06 +0900 Subject: packet: lldp: python3 fix iterator doesn't has next method. Reported-by: Takeshi Signed-off-by: FUJITA Tomonori Tested-by: Takeshi --- ryu/topology/switches.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py index f4198389..5fe5d264 100644 --- a/ryu/topology/switches.py +++ b/ryu/topology/switches.py @@ -14,6 +14,7 @@ # limitations under the License. import logging +import six import struct import time import json @@ -460,10 +461,10 @@ class LLDPPacket(object): def lldp_parse(data): pkt = packet.Packet(data) i = iter(pkt) - eth_pkt = i.next() + eth_pkt = six.next(i) assert type(eth_pkt) == ethernet.ethernet - lldp_pkt = i.next() + lldp_pkt = six.next(i) if type(lldp_pkt) != lldp.lldp: raise LLDPPacket.LLDPUnknownFormat() -- cgit v1.2.3