From e6d30fa77de42aec189f50da2616814befecaa70 Mon Sep 17 00:00:00 2001 From: halo Date: Thu, 1 Sep 2022 09:52:48 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20telnet=E7=B3=BB=E7=BB=9F=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E8=BE=93=E5=87=BA=E4=BD=BF=E7=94=A8utf-8=E7=BC=96?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/settings/utils/telnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/utils/telnet.py b/apps/settings/utils/telnet.py index 9785b43ae..4f03dda88 100644 --- a/apps/settings/utils/telnet.py +++ b/apps/settings/utils/telnet.py @@ -13,7 +13,7 @@ def telnet(dest_addr, port_number=23, timeout=10): return False, str(e) expected_regexes = [bytes(PROMPT_REGEX, encoding='ascii')] index, prompt_regex, output = connection.expect(expected_regexes, timeout=3) - return True, output.decode('ascii') + return True, output.decode('utf-8') if __name__ == "__main__":