From: richard Date: Tue, 20 Jan 2004 22:45:36 +0000 (+0000) Subject: fix to metakit from Brian Kelley X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=56016e9786d3c059886434a725108b903731eda7;p=roundup.git fix to metakit from Brian Kelley git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2058 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index a4a6dea..924006b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -68,7 +68,8 @@ Cleanup: 2004-??-?? 0.6.5 Fixed: - mailgw handling of subject-line errors -- allow serving of non-"file"-Class file content (eg. paper_file) +- allow serving of FileClass file content when the class isn't called + "file" (eg. messages and other FileClasses) - allowed negative ids (ie. new item markers) in HTMLClass.getItem, allowing "db/file_with_status/-1/status/menu" to generate a useful widget diff --git a/doc/index.txt b/doc/index.txt index cd01ea6..3b1cdf6 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -71,6 +71,7 @@ Dan Grassi, Engelbert Gruber, Juergen Hermann, Tobias Hunger, +Brian Kelley, James Kew, Sheila King, Bastian Kleineidam, diff --git a/roundup/backends/back_metakit.py b/roundup/backends/back_metakit.py index 38b63bb..45722a8 100755 --- a/roundup/backends/back_metakit.py +++ b/roundup/backends/back_metakit.py @@ -1,4 +1,4 @@ -# $Id: back_metakit.py,v 1.54 2003-12-05 04:43:46 richard Exp $ +# $Id: back_metakit.py,v 1.55 2004-01-20 22:45:36 richard Exp $ ''' Metakit backend for Roundup, originally by Gordon McMillan. @@ -84,7 +84,11 @@ class _Database(hyperdb.Database, roundupdb.Database): if classname == 'transactions': return self.dirty # fall back on the classes - return self.getclass(classname) + try: + return self.getclass(classname) + except KeyError, msg: + # KeyError's not appropriate here + raise AttributeError, str(msg) def getclass(self, classname): try: return self.classes[classname]