aboutsummarybugs & patchesrefslogtreecommitdiffstats
path: root/src/discord_image_bridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/discord_image_bridge')
-rw-r--r--src/discord_image_bridge/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/discord_image_bridge/__init__.py b/src/discord_image_bridge/__init__.py
index e0a658a..a9afc3f 100644
--- a/src/discord_image_bridge/__init__.py
+++ b/src/discord_image_bridge/__init__.py
@@ -30,6 +30,9 @@ class Root(object):
osname=fsmanager.hash2fname(hash)
if not os.path.isfile(osname):
ohash, osname=utils.download_uncached(hash)
+ if not ohash:
+ cherrypy.response.status=404
+ return "File not found"
if not ohash.startswith(hash):
cherrypy.log("Wrong hash! Expected %s, got %s"%(hash,ohash))
cherrypy.response.status=500