MoulinetteError / OSError never accepted keyword arguments such as exc_info :/ ...

This commit is contained in:
Alexandre Aubin 2018-12-12 14:23:11 +00:00
parent e97b07403f
commit caa2d0d91b

View file

@ -206,7 +206,7 @@ def _get_settings():
setting_key=key)) setting_key=key))
unknown_settings[key] = value unknown_settings[key] = value
except Exception as e: except Exception as e:
raise YunohostError('global_settings_cant_open_settings', reason=e, exc_info=1) raise YunohostError('global_settings_cant_open_settings', reason=e)
if unknown_settings: if unknown_settings:
try: try:
@ -227,10 +227,10 @@ def _save_settings(settings, location=SETTINGS_PATH):
try: try:
result = json.dumps(settings_without_description, indent=4) result = json.dumps(settings_without_description, indent=4)
except Exception as e: except Exception as e:
raise YunohostError('global_settings_cant_serialize_settings', reason=e, exc_info=1) raise YunohostError('global_settings_cant_serialize_settings', reason=e)
try: try:
with open(location, "w") as settings_fd: with open(location, "w") as settings_fd:
settings_fd.write(result) settings_fd.write(result)
except Exception as e: except Exception as e:
raise YunohostError('global_settings_cant_write_settings', reason=e, exc_info=1) raise YunohostError('global_settings_cant_write_settings', reason=e)