Gets plugins/edsy.py working. The usual string vs. bytes shenanigans.

This commit is contained in:
Athanasius committed 2020-06-21 16:23:00 +01:00
1 parent 5079f8fdc6
commit 0d893c1c56
1 file changed
+2 -2
+2 -2
View File
@@ -17,8 +17,8 @@ def shipyard_url(loadout, is_beta):
if not string:
return False
out = io.StringIO()
out = io.BytesIO()
with gzip.GzipFile(fileobj=out, mode='w') as f:
f.write(string)
return (is_beta and 'http://edsy.org/beta/#/I=' or 'http://edsy.org/#/I=') + base64.urlsafe_b64encode(out.getvalue()).replace('=', '%3D')
return (is_beta and 'http://edsy.org/beta/#/I=' or 'http://edsy.org/#/I=') + base64.urlsafe_b64encode(out.getvalue()).decode().replace('=', '%3D')