mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Use correct key for this locale lookup
This commit is contained in:
parent
14c4fafd39
commit
5744dbd6fa
2 changed files with 6 additions and 4 deletions
|
@ -40,7 +40,7 @@
|
|||
"websocket_request_expected": "Expected a WebSocket request",
|
||||
"cannot_open_file": "Could not open file {file:s} (reason: {error:s})",
|
||||
"cannot_write_file": "Could not write file {file:s} (reason: {error:s})",
|
||||
"unknown_error_reading_file": "Unknown error while trying to read file {file:s}",
|
||||
"unknown_error_reading_file": "Unknown error while trying to read file {file:s} (reason: {error:s})",
|
||||
"corrupted_json": "Corrupted json read from {ressource:s} (reason: {error:s})",
|
||||
"corrupted_yaml": "Corrupted yaml read from {ressource:s} (reason: {error:s})",
|
||||
"error_writing_file": "Error when writing file {file:s}: {error:s}",
|
||||
|
|
|
@ -31,8 +31,9 @@ def read_file(file_path):
|
|||
file_content = f.read()
|
||||
except IOError as e:
|
||||
raise MoulinetteError('cannot_open_file', file=file_path, error=str(e))
|
||||
except Exception as e:
|
||||
raise MoulinetteError('error_reading_file', file=file_path, error=str(e))
|
||||
except Exception:
|
||||
raise MoulinetteError('unknown_error_reading_file',
|
||||
file=file_path, error=str(e))
|
||||
|
||||
return file_content
|
||||
|
||||
|
@ -105,7 +106,8 @@ def read_ldif(file_path, filtred_entries=[]):
|
|||
except IOError as e:
|
||||
raise MoulinetteError('cannot_open_file', file=file_path, error=str(e))
|
||||
except Exception as e:
|
||||
raise MoulinetteError('error_reading_file', file=file_path, error=str(e))
|
||||
raise MoulinetteError('unknown_error_reading_file',
|
||||
file=file_path, error=str(e))
|
||||
|
||||
return parser.all_records
|
||||
|
||||
|
|
Loading…
Reference in a new issue