[fix] Wrong errno name in the api

This commit is contained in:
Jérôme Lebleu 2014-06-06 14:55:55 +02:00
parent e52a4085af
commit dc3657fcae

View file

@ -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,