diff roundup/cgi/templating.py @ 1030:f5216dbced55

translate bad class lookup error meaningfully
author Richard Jones <richard@users.sourceforge.net>
date Tue, 03 Sep 2002 07:45:51 +0000
parents 16498e77e3ff
children c28603c9f831
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Tue Sep 03 07:42:38 2002 +0000
+++ b/roundup/cgi/templating.py	Tue Sep 03 07:45:51 2002 +0000
@@ -191,7 +191,10 @@
         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()

Roundup Issue Tracker: http://roundup-tracker.org/