From 7f71e3755cbcba424ac82da9f9ee28665acb4c54 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 18 Dec 2020 00:24:27 -0300 Subject: Update compress to Python3 --- utils.py | 1 + 1 file changed, 1 insertion(+) (limited to 'utils.py') diff --git a/utils.py b/utils.py index 9625e1f..6172587 100644 --- a/utils.py +++ b/utils.py @@ -88,6 +88,7 @@ def stdout(mx): def compress(string): dbgprint("Compress: Received JSON data: %s" % (string)) sjs=json.dumps(string) + sjs=sjs.encode("ascii") sjs=zlib.compress(sjs) sjs=base64.b64encode(sjs) dbgprint("Compress: Sending base64+zlib JSON data: %s" % (sjs)) -- cgit v1.2.3-70-g09d2