[fix] Base64 python3 change

This commit is contained in:
ljf 2021-05-31 16:32:19 +02:00
parent 3bc45b5672
commit a5508b1db4

View file

@ -1845,7 +1845,7 @@ def app_config_apply(operation_logger, app, args):
logger.warning(m18n.n("experimental_feature"))
from yunohost.hook import hook_exec
from base64 import b64decode
installed = _is_installed(app)
if not installed:
raise YunohostValidationError(
@ -1900,7 +1900,7 @@ def app_config_apply(operation_logger, app, args):
i += 1
try:
with open(file_path, 'wb') as f:
f.write(content.decode("base64"))
f.write(b64decode(content))
except IOError as e:
raise YunohostError("cannot_write_file", file=file_path, error=str(e))
except Exception as e: