Code

issue2550715: IndexError when requesting non-existing file via http.
[roundup.git] / roundup / cgi / client.py
index ff4573abe175543943ffd07b6c4cf3ce6c6f8ffd..b4147d47923e46fb047baa225def472f13846fad 100644 (file)
@@ -920,7 +920,10 @@ class Client:
             raise Unauthorised(self._("You are not allowed to view "
                 "this file."))
 
-        mime_type = klass.get(nodeid, 'type')
+        try:
+            mime_type = klass.get(nodeid, 'type')
+        except IndexError, e:
+            raise NotFound(e)
         # Can happen for msg class:
         if not mime_type:
             mime_type = 'text/plain'