未验证 提交 8377ae48 编写于 作者: X Xu Han 提交者: GitHub

Merge pull request #1350 from hereischen/python3-unicode_escape

Python 3: Replace string_escape with unicode_escape for decode()
......@@ -84,7 +84,8 @@ def run(test, params, env):
client = params.get("shell_client", "ssh")
port = params.get("shell_port", "22")
prompt = params.get("shell_prompt", r"^root@.*[\#\$]\s*$|#")
linesep = params.get("shell_linesep", "\n").decode('string_escape')
linesep = params.get(
"shell_linesep", "\n").encode().decode('unicode_escape')
status_test_command = params.get("status_test_command", "echo $?")
compile_option_client = params.get("compile_option_client", "")
......
......@@ -57,7 +57,8 @@ def run(test, params, env):
client = params.get("shell_client", "ssh")
port = params.get("shell_port", "22")
prompt = params.get("shell_prompt", r"^root@.*[\#\$]\s*$|#")
linesep = params.get("shell_linesep", "\n").decode('string_escape')
linesep = params.get(
"shell_linesep", "\n").encode().decode('unicode_escape')
status_test_command = params.get("status_test_command", "echo $?")
compile_option_client_h = params.get("compile_option_client_h", "")
compile_option_server_h = params.get("compile_option_server_h", "")
......
......@@ -62,7 +62,8 @@ def run(test, params, env):
shell_port = params.get("shell_port")
os_type = params.get("os_type")
shell_prompt = params.get("shell_prompt", r"^root@.*[\#\$]\s*$|#")
linesep = params.get("shell_linesep", "\n").decode('string_escape')
linesep = params.get(
"shell_linesep", "\n").encode().decode('unicode_escape')
status_test_command = params.get("status_test_command", "echo $?")
ping_count = int(params.get("ping_count", 10))
compile_option_client = params.get("compile_option_client", "")
......
......@@ -34,7 +34,8 @@ def run(test, params, env):
shell_port = params.get("shell_port")
os_type = params.get("os_type")
shell_prompt = params.get("shell_prompt", r"^root@.*[\#\$]\s*$|#")
linesep = params.get("shell_linesep", "\n").decode('string_escape')
linesep = params.get(
"shell_linesep", "\n").encode().decode('unicode_escape')
status_test_command = params.get("status_test_command", "echo $?")
compile_option_client = params.get("compile_option_client", "")
compile_option_server = params.get("compile_option_server", "")
......
......@@ -66,7 +66,8 @@ def run(test, params, env):
client = params.get("shell_client")
port = params.get("shell_port")
prompt = params.get("shell_prompt", r"^root@.*[\#\$]\s*$|#")
linesep = params.get("shell_linesep", "\n").decode('string_escape')
linesep = params.get(
"shell_linesep", "\n").encode().decode('unicode_escape')
status_test_command = params.get("status_test_command", "echo $?")
compile_option_client = params.get("compile_option_client", "")
compile_option_server = params.get("compile_option_server", "")
......
......@@ -187,7 +187,7 @@ def run(test, params, env):
password=info[-4],
username=info[-5],
prompt=info[-6],
linesep=info[-7].decode('string_escape'),
linesep=info[-7].encode().decode('unicode_escape'),
status_test_command=info[-8],
compile_option=compile_option_server)
netperf_servers.append((server, vm))
......@@ -209,7 +209,7 @@ def run(test, params, env):
password=info[-4],
username=info[-5],
prompt=info[-6],
linesep=info[-7].decode('string_escape'),
linesep=info[-7].encode().decode('unicode_escape'),
status_test_command=info[-8],
compile_option=compile_option_client)
netperf_clients.append((client, vm))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册