[fix] pylint: use "raise ... from ..."

This commit is contained in:
Alexandre Flament 2020-12-17 09:57:57 +01:00
parent eb33ae6893
commit 3f8ebf70b1
4 changed files with 12 additions and 12 deletions

View file

@ -24,9 +24,9 @@ def load_yaml(file_name):
with open(file_name, 'r', encoding='utf-8') as settings_yaml:
return yaml.safe_load(settings_yaml)
except IOError as e:
raise SearxSettingsException(e, file_name)
raise SearxSettingsException(e, file_name) from e
except yaml.YAMLError as e:
raise SearxSettingsException(e, file_name)
raise SearxSettingsException(e, file_name) from e
def get_default_settings_path():