changeset 2094:9ee68c8b409b

Style fixes as suggested by Thomas.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Tue, 05 Jun 2007 00:38:41 +0200
parents 917bb59fdbb8
children 258d6e648eca
files MoinMoin/events/__init__.py MoinMoin/userform.py
diffstat 2 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/events/__init__.py	Tue Jun 05 00:38:25 2007 +0200
+++ b/MoinMoin/events/__init__.py	Tue Jun 05 00:38:41 2007 +0200
@@ -29,11 +29,13 @@
         
 class PageEvent(Event):
     """An event related to a page change"""
+    def __init__(self, request):
+        Event.__init__(self, request)
 
         
 class PageChangedEvent(PageEvent):
     def __init__(self, request, page, comment, trivial):
-        Event.__init__(self, request)
+        PageEvent.__init__(self, request)
         self.page = page
         self.comment = comment
         self.trivial = trivial
@@ -49,7 +51,7 @@
 
 class PageRevertedEvent(PageEvent):
     def __init__(self, request, pagename, previous, current):
-        Event.__init__(self, request)
+        PageEvent.__init__(self, request)
         self.pagename = pagename
         self.previous = previous
         self.current = current    
@@ -57,7 +59,7 @@
 
 class SubscribedToPageEvent(PageEvent):
     def __init__(self, request, pagename, username):
-        Event.__init__(self, request)    
+        PageEvent.__init__(self, request)    
         self.pagename = pagename
         self.username = username
 
--- a/MoinMoin/userform.py	Tue Jun 05 00:38:25 2007 +0200
+++ b/MoinMoin/userform.py	Tue Jun 05 00:38:41 2007 +0200
@@ -235,10 +235,7 @@
             # try to get the jid
             jid = wikiutil.clean_input(form.get('jid', [theuser.jid])[0]).strip()
             
-            jid_changed = False
-            if theuser.jid != jid:
-                jid_changed = True
-                
+            jid_changed = theuser.jid != jid                
             theuser.jid = jid
             
             if theuser.jid and self.request.cfg.user_jid_unique: