changeset 1912:901ff624d942

subscribe action: give msg if page subscription failed
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 26 Mar 2007 00:14:53 +0200
parents 0b2ad3099fcf
children 6769679b26f6
files MoinMoin/action/subscribe.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/subscribe.py	Sun Mar 25 23:14:29 2007 +0200
+++ b/MoinMoin/action/subscribe.py	Mon Mar 26 00:14:53 2007 +0200
@@ -9,10 +9,7 @@
 from MoinMoin.Page import Page
 
 def execute(pagename, request):
-    """ Subscribe or unsubscribe the user to pagename
-    
-    TODO: what if subscribe failed? no message is displayed.
-    """
+    """ Subscribe or unsubscribe the user to pagename """
     _ = request.getText
     cfg = request.cfg
     msg = None
@@ -45,6 +42,7 @@
         # Try to subscribe
         if request.user.subscribe(pagename):
             msg = _('You have been subscribed to this page.')
+        else: # should not happen
+            msg = _('You could not get subscribed to this page.')
 
     Page(request, pagename).send_page(msg=msg)
-