summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-18 00:24:27 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-18 00:24:27 -0300
commit7f71e3755cbcba424ac82da9f9ee28665acb4c54 (patch)
treec99f51785682a5d44140e1ca3224986ae8b40c29 /utils.py
parentacf3978aaa5b4d92495d7eba90fcfdd96410bc3f (diff)
downloadserver-7f71e3755cbcba424ac82da9f9ee28665acb4c54.tar.gz
server-7f71e3755cbcba424ac82da9f9ee28665acb4c54.tar.bz2
server-7f71e3755cbcba424ac82da9f9ee28665acb4c54.tar.xz
server-7f71e3755cbcba424ac82da9f9ee28665acb4c54.zip
Update compress to Python3
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py1
1 files changed, 1 insertions, 0 deletions
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))