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')