Merge pull request #162 from YunoHost/make_exception_more_useful

[enh] display file path on file_not_exist error
This commit is contained in:
Laurent Peuch 2016-11-24 15:01:06 +01:00 committed by GitHub
commit efa1eda3b1

View file

@ -315,7 +315,7 @@ def hook_exec(path, args=None, raise_on_error=False, no_trace=False,
if path[0] != '/':
path = os.path.realpath(path)
if not os.path.isfile(path):
raise MoulinetteError(errno.EIO, m18n.g('file_not_exist'))
raise MoulinetteError(errno.EIO, m18n.g('file_not_exist', path=path))
# Construct command variables
cmd_args = ''