summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-07-01 10:44:01 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-07-01 10:45:42 +0900
commitfe128c1172070476ba09536bbbbe81c69a46ef57 (patch)
tree9f05a6ab08c4c1cef8239f8fb167b573988ca0e6
parentffb409135ee512b26b896bb8e5749f28f95e2ba7 (diff)
python3: fix bgp reggression
fix the c0590ea903d1fbe40a22e04970d5a8a7e489aa44 commit. Reported-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Tested-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
-rw-r--r--ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py b/ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py
index 78b2fb33..c20c97c9 100644
--- a/ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py
+++ b/ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py
@@ -1,4 +1,4 @@
-import io
+import six
class RouteFormatterMixin(object):
@@ -17,7 +17,12 @@ class RouteFormatterMixin(object):
@classmethod
def _format_family(cls, dest_list):
- msg = io.StringIO()
+ if six.PY3:
+ import io
+ msg = io.StringIO()
+ else:
+ import StringIO
+ msg = StringIO.StringIO()
def _append_path_info(buff, path, is_best, show_prefix):
aspath = path.get('aspath')