diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-28 22:11:06 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-28 22:11:06 +0900 |
commit | 50ad776a32ca5c8df1362d41014333e47770058c (patch) | |
tree | d755e17542d0732732211b0ce9ae023829c3b368 | |
parent | 571f6a1c5ac4e5f50c34ab9955c7c20556e61355 (diff) |
packet: lldp: python3 fix
iterator doesn't has next method.
Reported-by: Takeshi <a86487817@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Takeshi <a86487817@gmail.com>
-rw-r--r-- | ryu/topology/switches.py | 5 |
1 files 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() |