From 6f1fff793b3e8440fe75d812f932972c7180db42 Mon Sep 17 00:00:00 2001 From: Xiaoling Gao Date: Mon, 3 Dec 2018 12:32:28 +0800 Subject: [PATCH] virttest.guest_agent: Fix issue that qga can't get response with '\xff' on python3 Signed-off-by: Xiaoling Gao --- virttest/guest_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virttest/guest_agent.py b/virttest/guest_agent.py index b9512b5b92..6215f8b1d4 100644 --- a/virttest/guest_agent.py +++ b/virttest/guest_agent.py @@ -228,7 +228,7 @@ def _read_objects(self, timeout=READ_OBJECTS_TIMEOUT): objs = [] for line in s.splitlines(): try: - if line[0] == b'\xff': + if line[0:1] == b'\xff': line = line[1:] objs += [json.loads(line)] self._log_lines(line.decode(errors="replace"))