salt/python3-compatibility-fix-got-bytes-instead-of-strin.patch

26 lines
999 B
Diff
Raw Normal View History

From d21ea1062f1cd8da0e604288b369c7ff38919c78 Mon Sep 17 00:00:00 2001
From: Michael Calmer <mc@suse.de>
Date: Tue, 19 Dec 2017 17:07:19 +0100
Subject: [PATCH] python3 compatibility fix - got bytes instead of string
---
salt/netapi/rest_cherrypy/tools/websockets.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/salt/netapi/rest_cherrypy/tools/websockets.py b/salt/netapi/rest_cherrypy/tools/websockets.py
index fe4f9def85..44c5e2fa05 100644
--- a/salt/netapi/rest_cherrypy/tools/websockets.py
+++ b/salt/netapi/rest_cherrypy/tools/websockets.py
@@ -54,6 +54,6 @@ class SynchronizingWebsocket(WebSocket):
This ensures completion of the underlying websocket connection
and can be used to synchronize parallel senders.
'''
- if message.data == 'websocket client ready':
+ if message.data.decode('utf-8') == 'websocket client ready':
self.pipe.send(message)
self.send('server received message', False)
--
2.13.6