changeset 5172:f8d1d1d5c7a5

SubscribeUser action: cosmetic changes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 02 Oct 2009 18:26:42 +0200
parents 1f922d6aaba6
children b51c4e6efeee
files MoinMoin/action/SubscribeUser.py
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SubscribeUser.py	Sun Sep 20 20:30:23 2009 +0200
+++ b/MoinMoin/action/SubscribeUser.py	Fri Oct 02 18:26:42 2009 +0200
@@ -8,12 +8,12 @@
 """
 
 import sys, os
-#sys.path.append("YOUR CONFIG DIRECTORY HERE")
 
 from MoinMoin.Page import Page
 from MoinMoin import user
 from MoinMoin import wikiutil
 
+
 def show_form(pagename, request):
     _ = request.getText
     request.emit_http_headers()
@@ -30,6 +30,7 @@
     request.theme.send_footer(pagename)
     request.theme.send_closing_html()
 
+
 def show_result(pagename, request):
     _ = request.getText
     request.emit_http_headers()
@@ -45,6 +46,7 @@
     request.theme.send_footer(pagename)
     request.theme.send_closing_html()
 
+
 def subscribe_users(request, usernamelist, pagename, formatter):
     _ = request.getText
 
@@ -79,10 +81,14 @@
             result.append(formatter.url(0))
             result.append(formatter.linebreak(preformatted=0))
 
-    result.extend([''.join([formatter.smiley('{X}'), formatter.text(" " + _("Not a user:") + " " + username), formatter.linebreak(preformatted=0)]) for username in usernamelist if username not in realusers])
+    result.extend([''.join([formatter.smiley('{X}'),
+                            formatter.text(" " + _("Not a user:") + " " + username),
+                            formatter.linebreak(preformatted=0)])
+                   for username in usernamelist if username not in realusers])
 
     return ''.join(result)
 
+
 def execute(pagename, request):
     _ = request.getText
     if not request.user.may.admin(pagename):
@@ -94,9 +100,10 @@
     else:
         show_result(pagename, request)
 
+
 if __name__ == '__main__':
     args = sys.argv
-    if not len(args) > 1:
+    if len(args) < 2:
         print >>sys.stderr, """Subscribe users
 
 %(myname)s pagename username[,username[,username[,...]]] [URL]