From 4620e9b823d1eb324f0945ba9172126c86c6d031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Kj=C3=A6r?= Date: Thu, 27 Jul 2023 14:54:39 +0200 Subject: [PATCH] Decode rbuffer for string comparison --- src/exabgp/application/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/exabgp/application/cli.py b/src/exabgp/application/cli.py index d704d8b5f..4ad4c3909 100644 --- a/src/exabgp/application/cli.py +++ b/src/exabgp/application/cli.py @@ -170,11 +170,11 @@ def cmdline(cmdarg): # we read some data but it is not ending by a new line (ie: not a command completion) if rbuffer[-1] != 10: # \n continue - if AnswerStream.done.endswith(rbuffer[-len(AnswerStream.done) :]): + if AnswerStream.done.endswith(rbuffer.decode()[-len(AnswerStream.done) :]): break - if AnswerStream.error.endswith(rbuffer[-len(AnswerStream.error) :]): + if AnswerStream.error.endswith(rbuffer.decode()[-len(AnswerStream.error) :]): break - if AnswerStream.shutdown.endswith(rbuffer[-len(AnswerStream.shutdown) :]): + if AnswerStream.shutdown.endswith(rbuffer.decode()[-len(AnswerStream.shutdown) :]): break renamed = ['']