diff MoinMoin/events/__init__.py @ 2337:1d85514968a2

Fix remaining excessive white space characters.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Wed, 04 Jul 2007 12:12:00 +0200
parents 10be78f1fa97
children 1d60f9aa07d1
line wrap: on
line diff
--- a/MoinMoin/events/__init__.py	Wed Jul 04 12:10:11 2007 +0200
+++ b/MoinMoin/events/__init__.py	Wed Jul 04 12:12:00 2007 +0200
@@ -40,19 +40,19 @@
 
     description = u"""Page has been modified (edit, creation, deletion)"""
     req_superuser = False
-    
+
     def __init__(self, request, page, comment, trivial):
         PageEvent.__init__(self, request)
         self.page = page
         self.comment = comment
         self.trivial = trivial
 
-        
+
 class PageRenamedEvent(PageEvent):
-    
+
     description = u"""Page has been renamed"""
     req_superuser = False
-    
+
     def __init__(self, request, page, old_page, comment):
         PageEvent.__init__(self, request)
         self.page = page
@@ -61,10 +61,10 @@
 
 
 class PageDeletedEvent(PageEvent):
-    
+
     description = u"""Page has been deleted"""
     req_superuser = False
-    
+
     def __init__(self, request, page, comment):
         PageEvent.__init__(self, request)
         self.request = request
@@ -73,10 +73,10 @@
 
 
 class FileAttachedEvent(PageEvent):
-    
+
     description = u"""A new attachment has been added"""
     req_superuser = False
-    
+
     def __init__(self, request, pagename, attachment_name, size):
         PageEvent.__init__(self, request)
         self.request = request
@@ -86,68 +86,68 @@
 
 
 class PageRevertedEvent(PageEvent):
-    
+
     description = u"""A page has been reverted to a previous state"""
     req_superuser = False
-    
+
     def __init__(self, request, pagename, previous, current):
         PageEvent.__init__(self, request)
         self.pagename = pagename
         self.previous = previous
-        self.current = current    
+        self.current = current
 
 
 class SubscribedToPageEvent(PageEvent):
-    
+
     description = u"""An user has subscribed to a page"""
     req_superuser = True
-    
+
     def __init__(self, request, pagename, username):
-        PageEvent.__init__(self, request)    
+        PageEvent.__init__(self, request)
         self.pagename = pagename
         self.username = username
 
 
 class JabberIDSetEvent(Event):
     """ Sent when user changes her Jabber ID """
-    
+
     def __init__(self, request, jid):
         Event.__init__(self, request)
         self.jid = jid
-        
+
 class JabberIDUnsetEvent(Event):
     """ Sent when Jabber ID is no longer used
-    
+
     Obviously this will be usually sent along with JabberIDSetEvent,
     because we require user's jabber id to be unique by default.
-    
+
     """
     def __init__(self, request, jid):
         Event.__init__(self, request)
         self.jid = jid
-        
+
 class UserCreatedEvent(Event):
     """ Sent when a new user has been created """
-    
+
     description = u"""A new account has been created"""
     req_superuser = True
-    
+
     def __init__(self, request, user):
         Event.__init__(self, request)
         self.user = user
-        
+
 class EventResult:
     """ This is a base class for messages passed from event handlers """
     pass
-        
+
 def get_handlers(cfg):
     """Create a list of available event handlers.
-    
+
     Each handler is a handle() function defined in an plugin,
     pretty much like in case of actions.
-    
+
     TODO: maybe make it less dumb? ;-)
-    
+
     """
     event_handlers = []
     names = wikiutil.getPlugins("events", cfg)
@@ -157,41 +157,41 @@
             handler = wikiutil.importPlugin(cfg, "events", name, "handle")
         except PluginAttributeError:
             handler = None
-        
+
         if handler is not None:
             event_handlers.append(handler)
-            
+
     return event_handlers
 
 
 def send_event(event):
     """Function called from outside to process an event
-    
+
     @return: a list of messages returned by handlers
     @rtype: list
     """
-   
+
     # A list of messages generated by event handlers, passed back to caller
     msg = []
     cfg = event.request.cfg
-    
+
     # Try to handle the event with each available handler (for now)
     for handle in cfg.event_handlers:
         retval = handle(event)
         if retval:
             msg.append(retval)
-            
+
     return msg
 
 def get_subscribable_events():
     """Create and return a list of user-visible events
-    
+
     @return: A list of user-visible events described by dictionaries
     @rtype: dict
     """
     defs = globals()
-    subscribable_events = {}    
-    
+    subscribable_events = {}
+
     for ev in defs.values():
         if type(ev) is type and issubclass(ev, Event) and ev.__dict__.has_key("description"):
             subscribable_events[ev.__name__] = {'desc': ev.description,