From a1822e2f42aa1a7ff516ff76ea5dee1def233a20 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 6 Oct 2019 11:25:01 +0200 Subject: [PATCH] Use str instead of strerror (not present) See https://forum.yunohost.org/t/cant-create-a-user-after-post-intsallation/9190. --- src/yunohost/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yunohost/user.py b/src/yunohost/user.py index c6413d7e1..fe27492f4 100644 --- a/src/yunohost/user.py +++ b/src/yunohost/user.py @@ -199,7 +199,7 @@ def user_create(operation_logger, username, firstname, lastname, mail, password, with open('/etc/ssowat/conf.json.persistent') as json_conf: ssowat_conf = json.loads(str(json_conf.read())) except ValueError as e: - raise YunohostError('ssowat_persistent_conf_read_error', error=e.strerror) + raise YunohostError('ssowat_persistent_conf_read_error', error=str(e)) except IOError: ssowat_conf = {} @@ -209,7 +209,7 @@ def user_create(operation_logger, username, firstname, lastname, mail, password, with open('/etc/ssowat/conf.json.persistent', 'w+') as f: json.dump(ssowat_conf, f, sort_keys=True, indent=4) except IOError as e: - raise YunohostError('ssowat_persistent_conf_write_error', error=e.strerror) + raise YunohostError('ssowat_persistent_conf_write_error', error=str(e)) try: ldap.add('uid=%s,ou=users' % username, attr_dict)