Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 5010:0428d2004a86
Fix exception handling to be python2.5 compatible
The exception handling introduced in commit hg:494d2550:
Display errors containing HTML with RejectRaw (issue2550847)
contained the new style of exception handling that is not compatible
with python2.5. Rework these exception handlers to use the old style to
maintain compatibility with python2.5
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Wed, 06 Jan 2016 16:02:34 +1100 |
| parents | 494d255043c9 |
| children | dce3cfe7ec61 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Tue Jan 05 22:16:54 2016 +0100 +++ b/roundup/cgi/client.py Wed Jan 06 16:02:34 2016 +1100 @@ -1274,7 +1274,7 @@ return getattr(self, action_klass)() else: return action_klass(self).execute() - except (ValueError, Reject) as err: + except (ValueError, Reject), err: escape = not isinstance(err, RejectRaw) self.add_error_message(str(err), escape=escape)
