From fe128c1172070476ba09536bbbbe81c69a46ef57 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 1 Jul 2015 10:44:01 +0900 Subject: [PATCH] python3: fix bgp reggression fix the c0590ea903d1fbe40a22e04970d5a8a7e489aa44 commit. Reported-by: Toshiki Tsuboi Signed-off-by: FUJITA Tomonori Tested-by: Toshiki Tsuboi --- .../bgp/operator/commands/show/route_formatter_mixin.py | 9 +++++++-- 1 file 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')