# HG changeset patch # User Charly COSTE # Date 1266749627 -3600 # Node ID 6db99e458168b9e3df6a525f88e7a2d50a249aca # Parent e04410e7e527483ff85189b45384b8d5d66bdd82 fixed calls to Bot.restart_bridges_delayed(), arguments changed in f52cb2f6e273328e73d75ab4ecf214c8dc9dfe1b Signed-off-by: Charly COSTE diff --git a/bot.py b/bot.py --- a/bot.py +++ b/bot.py @@ -157,7 +157,7 @@ class Bot(threading.Thread): # MUC server is going down, try to restart the bridges in 1 minute bridges = self.findBridges([from_.getDomain()]) m = 'The MUC server '+from_.getDomain()+' seems to be going down, the bot will try to recreate all bridges related to this server in 1 minute' - error = (say_levels.warning, m) + error = [say_levels.warning, m] self.restart_bridges_delayed(bridges, 60, error) return elif r == '': @@ -264,8 +264,8 @@ class Bot(threading.Thread): # Remote server not found # Stop bridges that depend on this server bridges = self.findBridges([from_.getDomain()]) - error_message = '[Error] XMPP Remote server not found: '+from_.getDomain() - self.restart_bridges_delayed(bridges, 60, error_message) + error = [say_levels.error, 'XMPP Remote server not found: '+from_.getDomain()] + self.restart_bridges_delayed(bridges, 60, error) else: raise Exception(presence.__str__(fancy=1).encode('utf-8')) diff --git a/bridge.py b/bridge.py --- a/bridge.py +++ b/bridge.py @@ -105,8 +105,8 @@ class Bridge: def _RemoteServerNotFound_handler(self): server = xmpp.protocol.JID(self.xmpp_room_jid).getDomain() bridges = self.bot.findBridges([server]) - error_message = '[Warning] The MUC server '+server+' seems to be down, the bot will try to recreate all bridges related to this server in 5 minutes' - self.bot.restart_bridges_delayed(bridges, 300, error_message) + error = [say_levels.warning, 'The MUC server '+server+' seems to be down, the bot will try to recreate all bridges related to this server in 5 minutes'] + self.bot.restart_bridges_delayed(bridges, 300, error) def _xmpp_join_callback(self, errors):