Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 4530:c1c395058dee
issue2550715: IndexError when requesting non-existing file via http.
Reported and fixed by Cédric Krier.
| author | Bernhard Reiter <Bernhard.Reiter@intevation.de> |
|---|---|
| date | Thu, 11 Aug 2011 19:21:26 +0000 |
| parents | a03646a02f68 |
| children | d16d9bf655d8 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Tue Jul 19 07:54:22 2011 +0000 +++ b/roundup/cgi/client.py Thu Aug 11 19:21:26 2011 +0000 @@ -920,7 +920,10 @@ 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'
