Signed-off-by: Satoshi Kobayashi <[email protected]>
---
 ryu/lib/packet/bgp.py  | 7 +++++++
 ryu/lib/packet/ospf.py | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py
index 84de1e1..0314748 100644
--- a/ryu/lib/packet/bgp.py
+++ b/ryu/lib/packet/bgp.py
@@ -29,6 +29,13 @@ import copy
 import netaddr
 import numbers
 
+try:
+    # Python 3
+    from functools import reduce
+except ImportError:
+    # Python 2
+    pass
+
 from ryu.lib.stringify import StringifyMixin
 from ryu.lib.packet import afi as addr_family
 from ryu.lib.packet import safi as subaddr_family
diff --git a/ryu/lib/packet/ospf.py b/ryu/lib/packet/ospf.py
index d1ee33a..1637e2d 100644
--- a/ryu/lib/packet/ospf.py
+++ b/ryu/lib/packet/ospf.py
@@ -19,6 +19,13 @@ RFC 2328 OSPF version 2
 
 import struct
 
+try:
+    # Python 3
+    from functools import reduce
+except ImportError:
+    # Python 2
+    pass
+
 from ryu.lib.stringify import StringifyMixin
 from ryu.lib.packet import packet_base
 from ryu.lib.packet import packet_utils
-- 
2.3.2 (Apple Git-55)


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to