summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py2
-rw-r--r--ryu/services/protocols/bgp/operator/ssh.py5
2 files changed, 5 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 e29c7c7f..4e0a9b38 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
@@ -41,7 +41,7 @@ class RouteFormatterMixin(object):
prefix = path.get('prefix')
# Append path info to String buffer.
- buff.write(cls.fmtstr.format(path_status, prefix, labels,
+ buff.write(cls.fmtstr.format(path_status, prefix, str(labels),
next_hop, bpr, str(med),
str(localpref),
' '.join(map(str, aspath))))
diff --git a/ryu/services/protocols/bgp/operator/ssh.py b/ryu/services/protocols/bgp/operator/ssh.py
index 8a584db9..4187332e 100644
--- a/ryu/services/protocols/bgp/operator/ssh.py
+++ b/ryu/services/protocols/bgp/operator/ssh.py
@@ -152,6 +152,7 @@ Hello, this is Ryu BGP speaker (version %s).
def _handle_csi_seq(self):
c = self.chan.recv(1)
+ c = c.decode() # For Python3 compatibility
if c == 'A':
self._lookup_hist_up()
elif c == 'B':
@@ -165,13 +166,14 @@ Hello, this is Ryu BGP speaker (version %s).
def _handle_esc_seq(self):
c = self.chan.recv(1)
+ c = c.decode() # For Python3 compatibility
if c == '[':
self._handle_csi_seq()
else:
LOG.error("non CSI sequence. do nothing")
def _send_csi_seq(self, cmd):
- self.chan.send(b'\x1b[' + cmd)
+ self.chan.send('\x1b[' + cmd)
def _movcursor(self, curpos):
if self.prompted and curpos < len(self.PROMPT):
@@ -347,6 +349,7 @@ Hello, this is Ryu BGP speaker (version %s).
while True:
c = self.chan.recv(1)
+ c = c.decode() # For Python3 compatibility
if len(c) == 0:
break