changeset 5785:62202e5435e2

Catch iand display all SaveErrors when revert failed, not just RevertError and Unchanged. Fixes http://moinmo.in/MoinMoinBugs/SaveError%20on%20revert%20due%20to%20BadContent
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Tue, 05 Jul 2011 20:07:18 +0200
parents 5752497d5b03
children 8cb5ab136b87
files MoinMoin/action/revert.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/revert.py	Sun Jun 12 16:34:09 2011 +0200
+++ b/MoinMoin/action/revert.py	Tue Jul 05 20:07:18 2011 +0200
@@ -62,9 +62,7 @@
             msg = pg.revertPage(rev, comment)
             # make it show the current version...
             self.request.rev = None
-        except PageEditor.RevertError, error:
-            msg = unicode(error)
-        except PageEditor.Unchanged, error:
+        except PageEditor.SaveError, error:
             msg = unicode(error)
 
         return True, msg