From 36c8d1a787b6d734e2d32e390dc8345434d9e4ce Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 2 Jul 2018 14:32:41 +0200 Subject: [PATCH] e.strerror don't always exists, use str(e) instead --- src/yunohost/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index ad8cfd846..05504a755 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -329,7 +329,7 @@ def tools_postinstall(domain, password, ignore_dyndns=False): ssowat_conf = json.loads(str(json_conf.read())) except ValueError as e: raise MoulinetteError(errno.EINVAL, - m18n.n('ssowat_persistent_conf_read_error', error=e.strerror)) + m18n.n('ssowat_persistent_conf_read_error', error=str(e))) except IOError: ssowat_conf = {} @@ -343,7 +343,7 @@ def tools_postinstall(domain, password, ignore_dyndns=False): json.dump(ssowat_conf, f, sort_keys=True, indent=4) except IOError as e: raise MoulinetteError(errno.EPERM, - m18n.n('ssowat_persistent_conf_write_error', error=e.strerror)) + m18n.n('ssowat_persistent_conf_write_error', error=str(e))) os.system('chmod 644 /etc/ssowat/conf.json.persistent')