It's works

thanks for help.

2015-09-27 7:49 GMT+08:00 FUJITA Tomonori <[email protected]>:

> On Sat, 26 Sep 2015 02:10:21 +0800
> Yi Tseng <[email protected]> wrote:
>
> > It seems that there is no "next" function in list_iterator in python3.4
> >
> >
> https://github.com/osrg/ryu/commit/b7235b395a270e80bbf9ffadbff3098bd9a7d6de#diff-4150d480f095b6b0542de6c2e9a68431
>
> How about the following?
>
> diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py
> index f419838..5fe5d26 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()
>
>


-- 
Yi Tseng (a.k.a Takeshi)
Taiwan National Chiao Tung University
Department of Computer Science
W2CNLab

http://blog.takeshi.tw
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to