Update CherryPy to 5.1.0

This commit is contained in:
JonnyWong16 2016-04-23 16:24:41 -07:00
parent f9825410dc
commit b2304992e5
25 changed files with 2383 additions and 130 deletions

View file

@ -49,7 +49,10 @@ def serve_file(path, content_type=None, disposition=None, name=None,
try:
st = os.stat(path)
except OSError:
except (OSError, TypeError, ValueError):
# OSError when file fails to stat
# TypeError on Python 2 when there's a null byte
# ValueError on Python 3 when there's a null byte
if debug:
cherrypy.log('os.stat(%r) failed' % path, 'TOOLS.STATIC')
raise cherrypy.NotFound()