mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Wrong errno name in the api
This commit is contained in:
parent
e52a4085af
commit
dc3657fcae
1 changed files with 1 additions and 1 deletions
|
@ -392,7 +392,7 @@ def error_to_response(error):
|
|||
"""Convert a MoulinetteError to relevant HTTP response."""
|
||||
if error.errno == errno.EPERM:
|
||||
return HTTPForbiddenResponse(error.strerror)
|
||||
elif error.errno == errno.EACCESS:
|
||||
elif error.errno == errno.EACCES:
|
||||
return HTTPUnauthorizedResponse(error.strerror)
|
||||
# Client-side error
|
||||
elif error.errno in [ errno.ENOENT, errno.ESRCH, errno.ENXIO, errno.EEXIST,
|
||||
|
|
Loading…
Add table
Reference in a new issue