changeset 2641:b0a8154e8874

Create SimpleXMLRPCServer when the thread is actually started.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Mon, 06 Aug 2007 03:46:12 +0200
parents af857f8c2e44
children 9db0237b056f
files jabberbot/xmlrpcbot.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jabberbot/xmlrpcbot.py	Mon Aug 06 03:45:12 2007 +0200
+++ b/jabberbot/xmlrpcbot.py	Mon Aug 06 03:46:12 2007 +0200
@@ -271,12 +271,14 @@
             error = "You must set a (long) secret string"
             self.log.critical(error)
             raise ConfigurationError(error)
-
-        self.server = SimpleXMLRPCServer((config.xmlrpc_host, config.xmlrpc_port))
+        
+        self.server = None
 
     def run(self):
         """Starts the server / thread"""
 
+        self.server = SimpleXMLRPCServer((config.xmlrpc_host, config.xmlrpc_port))
+        
         # Register methods having an "export" attribute as XML RPC functions and
         # decorate them with a check for a shared (wiki-bot) secret.
         items = self.__class__.__dict__.items()