changeset 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 3766e0ca8e7a
children d5da643b3d25
files roundup/cgi/actions.py roundup/cgi/client.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/cgi/actions.py	Tue Jan 05 22:16:54 2016 +0100
+++ b/roundup/cgi/actions.py	Wed Jan 06 16:02:34 2016 +1100
@@ -620,7 +620,7 @@
         # handle the props
         try:
             message = self._editnodes(props, links)
-        except (ValueError, KeyError, IndexError, Reject) as message:
+        except (ValueError, KeyError, IndexError, Reject), message:
             escape = not isinstance(message, RejectRaw)
             self.client.add_error_message(
                 self._('Edit Error: %s') % str(message), escape=escape)
@@ -666,7 +666,7 @@
         try:
             # when it hits the None element, it'll set self.nodeid
             messages = self._editnodes(props, links)
-        except (ValueError, KeyError, IndexError, Reject) as message:
+        except (ValueError, KeyError, IndexError, Reject), message:
             escape = not isinstance(message, RejectRaw)
             # these errors might just be indicative of user dumbness
             self.client.add_error_message(_('Error: %s') % str(message),
@@ -850,7 +850,7 @@
             try:
                 # when it hits the None element, it'll set self.nodeid
                 messages = self._editnodes(props, links)
-            except (ValueError, KeyError, IndexError, Reject) as message:
+            except (ValueError, KeyError, IndexError, Reject), message:
                 escape = not isinstance(message, RejectRaw)
                 # these errors might just be indicative of user dumbness
                 self.client.add_error_message(_('Error: %s') % str(message),
--- 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)
 

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