mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
Gets plugins/edsy.py working. The usual string vs. bytes shenanigans.
This commit is contained in:
parent
5079f8fdc6
commit
0d893c1c56
@ -17,8 +17,8 @@ def shipyard_url(loadout, is_beta):
|
|||||||
if not string:
|
if not string:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
out = io.StringIO()
|
out = io.BytesIO()
|
||||||
with gzip.GzipFile(fileobj=out, mode='w') as f:
|
with gzip.GzipFile(fileobj=out, mode='w') as f:
|
||||||
f.write(string)
|
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')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user