🐛 Fix plugin download encode error

🐛 修复安装插件时的编码错误
This commit is contained in:
xtaodada 2021-11-26 15:02:30 +08:00
parent 8a1505d769
commit cf2587ab11
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736

View File

@ -32,8 +32,8 @@ def remove_plugin(name):
async def download(name): async def download(name):
html = await get(f'{git_source}{name}.py') html = await get(f'{git_source}{name}.py')
with open(f'plugins/{name}.py', mode='w') as f: with open(f'plugins/{name}.py', mode='wb') as f:
f.write(html.text) f.write(html.text.encode('utf-8'))
return f'plugins/{name}.py' return f'plugins/{name}.py'