Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 5182:dc657fbbc790
- issue2550933 - Fix Traceback in cgi/templating.py when a string is
passed to PasswordHTMLProperty::plain. (John Rouillard)
This is a more pythonic patch than presented in the issue. Try the
original code and if it fails take alternative action.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 11 Feb 2017 17:20:47 -0500 |
| parents | f95650727b1c |
| children | 5c8808f55d93 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Sat Jan 28 21:15:49 2017 -0500 +++ b/roundup/cgi/templating.py Sat Feb 11 17:20:47 2017 -0500 @@ -1554,7 +1554,10 @@ if self._value is None: return '' - value = self._value.dummystr() + try: + value = self._value.dummystr() + except AttributeError: + value = self._('[hidden]') if escape: value = cgi.escape(value) return value
