From: richard Date: Tue, 3 Sep 2002 07:45:51 +0000 (+0000) Subject: translate bad class lookup error meaningfully X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=226ce92566b5480b182c80088d19dd2ea1b63581;p=roundup.git translate bad class lookup error meaningfully git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1049 57a73879-2fb5-44c3-a270-3262357dd7e2 --- 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()