Skip to content

Commit 6fb090c

Browse files
author
Richard Jones
committed
backport from HEAD
1 parent 2e38937 commit 6fb090c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Fixed:
88
- made errors from bad input in the quick "Show issue:" form more
99
user-friendly (sf bug 904064)
1010
- don't add a query to a user's list if it's already there
11+
- nicer invalid property error in HTML templating
1112

1213

1314
2004-02-25 0.6.6

roundup/cgi/templating.py

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

312312
# get the property
313-
prop = self._props[item]
313+
try:
314+
prop = self._props[item]
315+
except KeyError:
316+
raise KeyError, 'No such property "%s" on %s'%(item, self.classname)
314317

315318
# look up the correct HTMLProperty class
316319
form = self._client.form

0 commit comments

Comments
 (0)