changeset 2629:5dac44252ca6

Whitespace fixes.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Tue, 24 Jul 2007 01:12:56 +0200
parents 35690680ecac
children d1658035d233
files jabberbot/commands.py jabberbot/xmlrpcbot.py jabberbot/xmppbot.py
diffstat 3 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/jabberbot/commands.py	Tue Jul 24 01:12:16 2007 +0200
+++ b/jabberbot/commands.py	Tue Jul 24 01:12:56 2007 +0200
@@ -27,25 +27,25 @@
         self.text = text
         self.subject = subject
         self.async = async
-        
+
 class NotificationCommandI18n(NotificationCommand):
     """Notification request that should be translated by the XMPP bot"""
     def __init__(self, jids, text, data={}, subject="", async=True):
         """A constructor
-        
+
         Params as in NotificationCommand.
-        
+
         @param text: text to send, use %(foo)s syntax to interpolate it with data
         @param data: dictionary of strings to interpolate into a translated message
         @type data: dict
-        
+
         """
         NotificationCommand.__init__(self, jids, text, subject, async)
         self.data = data
-        
+
     def translate(self, gettext_func):
         """Translate the message using a provided gettext function
-        
+
         @param gettext_func: a unary gettext function
         @return: translated message
         """
--- a/jabberbot/xmlrpcbot.py	Tue Jul 24 01:12:16 2007 +0200
+++ b/jabberbot/xmlrpcbot.py	Tue Jul 24 01:12:56 2007 +0200
@@ -79,7 +79,7 @@
     def report_error(self, jid, text, data={}):
         # Dummy function, so that the string appears in a .po file
         _ = lambda x: x
-        
+
         report = cmd.NotificationCommandI18n(jid, text, _("Error"), data, async=False)
         self.commands_out.put_nowait(report)
 
@@ -104,7 +104,7 @@
         def wrapped_func(self, command):
             # Dummy function, so that the string appears in a .po file
             _ = lambda x: x
-            
+
             self.token = None
             self.multicall = MultiCall(self.connection)
             jid = command.jid
@@ -119,9 +119,9 @@
 
                     if function(self, command) != u"SUCCESS":
                         self.warn_no_credentials(command.jid)
-                    
+
                     self.commands_out.put_nowait(command)
-                    
+
                 except xmlrpclib.Fault, fault:
                     msg = _("Your request has failed. The reason is:\n%(error)s")
                     self.log.error(str(fault))
@@ -143,14 +143,14 @@
 
     def warn_no_credentials(self, jid):
         """Warn a given JID that credentials check failed
-        
+
         @param jid: full JID to notify about failure
         @type jid: str
-        
+
         """
         # Dummy function, so that the string appears in a .po file
         _ = lambda x: x
-        
+
         msg = _("Credentials check failed, you may be unable to see all information.")
         warning = cmd.NotificationCommandI18n([jid], msg, async=False)
         self.commands_out.put_nowait(warning)
@@ -160,7 +160,7 @@
 
         token_result = u"FAILURE"
         self.multicall.getPage(command.pagename)
-        
+
         if not self.token:
             getpage_result = self.multicall()[0]
         else:
@@ -168,7 +168,7 @@
 
         command.data = getpage_result
         return token_result
-        
+
 
     get_page = _xmlrpc_decorator(get_page)
 
@@ -192,10 +192,10 @@
 
     def get_page_list(self, command):
         """Returns a list of all accesible pages"""
-                
+
         # Dummy function, so that the string appears in a .po file
         _ = lambda x: x
-        
+
         token_result = u"FAILURE"
         txt = _("This command may take a while to complete, please be patient...")
         info = cmd.NotificationCommandI18n([command.jid], txt, async=False)
--- a/jabberbot/xmppbot.py	Tue Jul 24 01:12:16 2007 +0200
+++ b/jabberbot/xmppbot.py	Tue Jul 24 01:12:56 2007 +0200
@@ -258,7 +258,7 @@
             for recipient in command.jids:
                 jid = JID(recipient)
                 jid_text = jid.bare().as_utf8()
-                
+
                 if isinstance(command, cmd.NotificationCommandI18n):
                     # Translate&interpolate the message with data
                     gettext_func = self.get_text(recipient)
@@ -308,7 +308,7 @@
         elif isinstance(command, cmd.GetPageInfo):
             intro = _("""Following detailed information on page "%(pagename)s" \
 is available:""")
-            
+
             if command.data['author'].startswith("Self:"):
                 author = command.data['author'][5:]
             else:
@@ -321,7 +321,7 @@
                         'day': datestr[6:8],
                         'time': datestr[9:17],
             }
-        
+
             msg = _("""Last author: %(author)s
 Last modification: %(modification)s
 Current version: %(version)s""") % {