diff MoinMoin/script/account/disable.py @ 1414:614005b5edb3

fixed some .format() unicode issues, partially fixing bug #124
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 07 Jul 2012 20:22:21 +0200
parents 4ac437141bbe
children 2be00a5febbe
line wrap: on
line diff
--- a/MoinMoin/script/account/disable.py	Sat Jul 07 20:19:20 2012 +0200
+++ b/MoinMoin/script/account/disable.py	Sat Jul 07 20:22:21 2012 +0200
@@ -37,15 +37,15 @@
             u = user.User(auth_username=name)
 
         if not u.exists():
-            print 'This user "{0}" does not exists!'.format(u.name)
+            print 'This user "{0!r}" does not exists!'.format(u.name)
             return
 
-        print " {0:<20} {1:<25} {2:<35}".format(u.id, u.name, u.email),
+        print " {0:<20} {1:!r<25} {2:<35}".format(u.id, u.name, u.email),
         if not u.disabled: # only disable once
             u.disabled = 1
-            u.name = "{0}-{1}".format(u.name, u.id)
+            u.name = u"{0}-{1}".format(u.name, u.id)
             if u.email:
-                u.email = "{0}-{1}".format(u.email, u.id)
+                u.email = u"{0}-{1}".format(u.email, u.id)
             u.subscribed_items = [] # avoid using email
             u.save()
             print "- disabled."