Skip to content

Commit bc1be94

Browse files
author
Richard Jones
committed
translate bad class lookup error meaningfully
1 parent b35d092 commit bc1be94

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roundup/cgi/templating.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ def __init__(self, client):
191191
self.client = client
192192
self.config = client.db.config
193193
def __getattr__(self, attr):
194-
self.client.db.getclass(attr)
194+
try:
195+
self.client.db.getclass(attr)
196+
except KeyError:
197+
raise AttributeError, attr
195198
return HTMLClass(self.client, attr)
196199
def classes(self):
197200
l = self.client.db.classes.keys()

0 commit comments

Comments
 (0)