Skip to content

Commit 8fcd40e

Browse files
author
Richard Jones
committed
nicer invalid property error in HTML templating
1 parent 2a6fa7f commit 8fcd40e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Fixed:
8080
for Multilink and Link form fields (sf bug 904072)
8181
- made errors from bad input in the quick "Show issue:" form more
8282
user-friendly (sf bug 904064)
83+
- don't add a query to a user's list if it's already there
84+
- nicer invalid property error in HTML templating
8385

8486

8587
2004-02-25 0.6.6

roundup/cgi/templating.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,10 @@ def __getitem__(self, item):
376376
return None
377377

378378
# get the property
379-
prop = self._props[item]
379+
try:
380+
prop = self._props[item]
381+
except KeyError:
382+
raise KeyError, 'No such property "%s" on %s'%(item, self.classname)
380383

381384
# look up the correct HTMLProperty class
382385
form = self._client.form

0 commit comments

Comments
 (0)