changeset 2090:10898faa48b8 catch-access-denied

Catch AccessDenied errors originating in item.do_show.
author Andreas Kloeckner <inform@tiker.net>
date Sat, 06 Apr 2013 22:40:21 -0400
parents 1d8366403411
children 7c00da767896
files MoinMoin/apps/frontend/views.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Tue Apr 02 00:39:37 2013 +0200
+++ b/MoinMoin/apps/frontend/views.py	Sat Apr 06 22:40:21 2013 -0400
@@ -348,9 +348,10 @@
                         item_name=item_name)
     try:
         item = Item.create(item_name, rev_id=rev)
+        result = item.do_show(rev)
     except AccessDenied:
         abort(403)
-    return item.do_show(rev)
+    return result
 
 
 @frontend.route('/<itemname:item_name>/')  # note: unwanted trailing slash