comparison 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
comparison
equal deleted inserted replaced
5009:3766e0ca8e7a 5010:0428d2004a86
1272 if isinstance(action_klass, type('')): 1272 if isinstance(action_klass, type('')):
1273 # old way of specifying actions 1273 # old way of specifying actions
1274 return getattr(self, action_klass)() 1274 return getattr(self, action_klass)()
1275 else: 1275 else:
1276 return action_klass(self).execute() 1276 return action_klass(self).execute()
1277 except (ValueError, Reject) as err: 1277 except (ValueError, Reject), err:
1278 escape = not isinstance(err, RejectRaw) 1278 escape = not isinstance(err, RejectRaw)
1279 self.add_error_message(str(err), escape=escape) 1279 self.add_error_message(str(err), escape=escape)
1280 1280
1281 def get_action_class(self, action_name): 1281 def get_action_class(self, action_name):
1282 if (hasattr(self.instance, 'cgi_actions') and 1282 if (hasattr(self.instance, 'cgi_actions') and

Roundup Issue Tracker: http://roundup-tracker.org/