changeset 2089:4ec961fd40d9

Even more stylistic fixes.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Sun, 03 Jun 2007 19:51:23 +0200
parents a99ed13fec1e
children 9fec7760489e
files MoinMoin/jabber/xmlrpcbot.py MoinMoin/jabber/xmppbot.py
diffstat 2 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/jabber/xmlrpcbot.py	Sun Jun 03 19:44:56 2007 +0200
+++ b/MoinMoin/jabber/xmlrpcbot.py	Sun Jun 03 19:51:23 2007 +0200
@@ -17,7 +17,6 @@
 
 class NotificationCommand:
     """Class representing a notification request"""
-    
     def __init__(self, jid, text):
         self.jid = jid
         self.text = text
--- a/MoinMoin/jabber/xmppbot.py	Sun Jun 03 19:44:56 2007 +0200
+++ b/MoinMoin/jabber/xmppbot.py	Sun Jun 03 19:51:23 2007 +0200
@@ -112,12 +112,12 @@
         
         self.config = config
         self.jid = JID(node_or_jid=jid, domain=config.xmpp_server, resource=config.xmpp_resource)
-        self.tlsconfig = TLSSettings(require = True, verify_peer = False)
+        self.tlsconfig = TLSSettings(require = True, verify_peer=False)
         
         # A dictionary of contact objects, ordered by bare JID
         self.contacts = { }
         
-        Client.__init__(self, self.jid, config.xmpp_password, config.xmpp_server, tls_settings = self.tlsconfig)
+        Client.__init__(self, self.jid, config.xmpp_password, config.xmpp_server, tls_settings=self.tlsconfig)
             
     def run(self):
         """Start the bot - enter the event loop"""
@@ -154,7 +154,7 @@
         except Queue.Empty:
             return False
         
-    def handle_command(self, command, ignore_dnd = False):
+    def handle_command(self, command, ignore_dnd=False):
         """Excecutes commands from other components"""
         
         if isinstance(command, NotificationCommand):
@@ -181,7 +181,7 @@
         @param text: message's body
         @param type: message type, as defined in RFC"""
         
-        message = Message(to_jid = jid, body = text, stanza_type=msg_type)
+        message = Message(to_jid=jid, body=text, stanza_type=msg_type)
         self.get_stream().send(message)
     
     def handle_message(self, message):
@@ -280,7 +280,7 @@
         # Confirm that we've handled this stanza
         return True
     
-    def send_queued_messages(self, contact, ignore_dnd = False):
+    def send_queued_messages(self, contact, ignore_dnd=False):
         """Sends messages queued for the contact"""
         for command in contact.messages:
             self.handle_command(command, ignore_dnd)
@@ -329,7 +329,7 @@
         if self.config.verbose:
             self.log("Disconnected.")
             
-    def roster_updated(self, item = None):
+    def roster_updated(self, item=None):
         """Called when roster gets updated"""
         
         if self.config.verbose: