From 226ce92566b5480b182c80088d19dd2ea1b63581 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 3 Sep 2002 07:45:51 +0000 Subject: [PATCH] translate bad class lookup error meaningfully git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1049 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi/templating.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index d2c5ae1..dfc662b 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -191,7 +191,10 @@ class HTMLDatabase: self.client = client self.config = client.db.config def __getattr__(self, attr): - self.client.db.getclass(attr) + try: + self.client.db.getclass(attr) + except KeyError: + raise AttributeError, attr return HTMLClass(self.client, attr) def classes(self): l = self.client.db.classes.keys() -- 2.30.2