From: richard Date: Fri, 27 Feb 2004 00:41:07 +0000 (+0000) Subject: nicer invalid property error in HTML templating X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1e11761b0158e3e9cb724b4edc6f411612906e7b;p=roundup.git nicer invalid property error in HTML templating git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2125 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 2cc9657..8099805 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -80,6 +80,8 @@ Fixed: for Multilink and Link form fields (sf bug 904072) - made errors from bad input in the quick "Show issue:" form more user-friendly (sf bug 904064) +- don't add a query to a user's list if it's already there +- nicer invalid property error in HTML templating 2004-02-25 0.6.6 diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index de9d096..c2635bb 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -376,7 +376,10 @@ class HTMLClass(HTMLInputMixin, HTMLPermissions): return None # get the property - prop = self._props[item] + try: + prop = self._props[item] + except KeyError: + raise KeyError, 'No such property "%s" on %s'%(item, self.classname) # look up the correct HTMLProperty class form = self._client.form