From: ber Date: Thu, 11 Aug 2011 19:21:26 +0000 (+0000) Subject: issue2550715: IndexError when requesting non-existing file via http. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1d785e9024cc06c4c4a098e767a2d24afb2a235d;p=roundup.git issue2550715: IndexError when requesting non-existing file via http. Reported and fixed by Cédric Krier. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4643 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 1c5281d..185d132 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ Entries without name were done by Richard Jones. Features: Fixed: +issue2550715: IndexError when requesting non-existing file via http. + Reported and fixed by Cédric Krier. (Bernhard) + issue2550695: 'No sort or group' settings not retained when editing queries. Reported and fixed by John Kristensen. Tested by Satchidanand Haridas. (Bernhard) diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py index ff4573a..b4147d4 100644 --- a/roundup/cgi/client.py +++ b/roundup/cgi/client.py @@ -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'