From 1d785e9024cc06c4c4a098e767a2d24afb2a235d Mon Sep 17 00:00:00 2001 From: ber Date: Thu, 11 Aug 2011 19:21:26 +0000 Subject: [PATCH] =?utf8?q?issue2550715:=20IndexError=20when=20requesting?= =?utf8?q?=20non-existing=20file=20via=20http.=20=20=20Reported=20and=20fi?= =?utf8?q?xed=20by=20C=C3=A9dric=20Krier.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4643 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 3 +++ roundup/cgi/client.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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' -- 2.30.2