Mercurial > xib
comparison bridge.py @ 262:db77ef37ff2c
fixed Bot.restart_bridges_delayed: removed buggy and useless test and improved error messages
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Mon, 22 Mar 2010 18:35:09 +0100 |
parents | 9a2302e8382b |
children | 73d6e284c18d |
comparison
equal
deleted
inserted
replaced
261:26f7df23aee0 | 262:db77ef37ff2c |
---|---|
107 | 107 |
108 | 108 |
109 def _RemoteServerNotFound_handler(self): | 109 def _RemoteServerNotFound_handler(self): |
110 server = xmpp.protocol.JID(self.xmpp_room_jid).getDomain() | 110 server = xmpp.protocol.JID(self.xmpp_room_jid).getDomain() |
111 bridges = self.bot.iter_bridges(patterns=[server]) | 111 bridges = self.bot.iter_bridges(patterns=[server]) |
112 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'] | 112 m = 'The MUC server '+server+' seems to be down' |
113 self.bot.restart_bridges_delayed(bridges, 300, error) | 113 self.bot.restart_bridges_delayed(bridges, 300, say_levels.warning, m) |
114 | 114 |
115 | 115 |
116 def _xmpp_join_callback(self, errors): | 116 def _xmpp_join_callback(self, errors): |
117 """Called by muc._xmpp_presence_handler""" | 117 """Called by muc._xmpp_presence_handler""" |
118 if len(errors) == 0: | 118 if len(errors) == 0: |