perf: telnet系统工具输出使用utf-8编码

pull/8733/head
halo 2022-09-01 09:52:48 +08:00 committed by Jiangjie.Bai
parent b25404cac1
commit e6d30fa77d
1 changed files with 1 additions and 1 deletions

View File

@ -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__":