comparison 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
comparison
equal deleted inserted replaced
1029:c3e391d9c4e9 1030:f5216dbced55
189 ''' 189 '''
190 def __init__(self, client): 190 def __init__(self, client):
191 self.client = client 191 self.client = client
192 self.config = client.db.config 192 self.config = client.db.config
193 def __getattr__(self, attr): 193 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
195 return HTMLClass(self.client, attr) 198 return HTMLClass(self.client, attr)
196 def classes(self): 199 def classes(self):
197 l = self.client.db.classes.keys() 200 l = self.client.db.classes.keys()
198 l.sort() 201 l.sort()
199 return [HTMLClass(self.client, cn) for cn in l] 202 return [HTMLClass(self.client, cn) for cn in l]

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