Code

translate bad class lookup error meaningfully
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 3 Sep 2002 07:45:51 +0000 (07:45 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 3 Sep 2002 07:45:51 +0000 (07:45 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1049 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/templating.py

index d2c5ae1d8cba77338f0bebe8ae3a0c7c25eb2fb4..dfc662b2dcb7df7526077cd2ad24aa415265ecd5 100644 (file)
@@ -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()