mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
python3: iter#next() doesn't exist
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
6c85fc9c70
commit
718e934184
@ -567,17 +567,17 @@ class BFDPacket(object):
|
||||
"""
|
||||
pkt = packet.Packet(data)
|
||||
i = iter(pkt)
|
||||
eth_pkt = i.next()
|
||||
eth_pkt = next(i)
|
||||
|
||||
assert type(eth_pkt) == ethernet.ethernet
|
||||
|
||||
ipv4_pkt = i.next()
|
||||
ipv4_pkt = next(i)
|
||||
assert type(ipv4_pkt) == ipv4.ipv4
|
||||
|
||||
udp_pkt = i.next()
|
||||
assert type(udp_pkt) == udp.udp
|
||||
|
||||
udp_payload = i.next()
|
||||
udp_payload = next(i)
|
||||
|
||||
return bfd.bfd.parser(udp_payload)[0]
|
||||
|
||||
@ -616,11 +616,11 @@ class ARPPacket(object):
|
||||
# Iteratize pkt
|
||||
pkt = packet.Packet(data)
|
||||
i = iter(pkt)
|
||||
eth_pkt = i.next()
|
||||
eth_pkt = next(i)
|
||||
# Ensure it's an ethernet frame.
|
||||
assert type(eth_pkt) == ethernet.ethernet
|
||||
|
||||
arp_pkt = i.next()
|
||||
arp_pkt = next(i)
|
||||
if type(arp_pkt) != arp.arp:
|
||||
raise ARPPacket.ARPUnknownFormat()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user