From 89a9b09a8095748761515e262bcfa9699ba63c32 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Thu, 26 Sep 2019 02:23:20 +0000 Subject: [PATCH] Fix a python3 issue in websocketclient Change-Id: I4a07c4b9660cab67930d0acd643d128e91519089 Closes-Bug: #1845394 (cherry picked from commit 54b24b3a731209f7144f6963c7fa30ed9c0a926a) --- zunclient/common/websocketclient/websocketclient.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zunclient/common/websocketclient/websocketclient.py b/zunclient/common/websocketclient/websocketclient.py index 5c38944e..36420f2d 100644 --- a/zunclient/common/websocketclient/websocketclient.py +++ b/zunclient/common/websocketclient/websocketclient.py @@ -179,6 +179,8 @@ class BaseClient(object): self.quit = True return + if isinstance(data, bytes): + data = data.decode("utf-8") sys.stdout.write(data) sys.stdout.flush()