Mercurial > xib
comparison bridge.py @ 201:de574314990e
log some more things when Bot.debug is False
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Thu, 25 Feb 2010 20:48:33 +0100 |
parents | 4a379eb359dd |
children | 2a81c480439a |
comparison
equal
deleted
inserted
replaced
200:740effa74c18 | 201:de574314990e |
---|---|
151 | 151 |
152 self.bot.error(3, 'adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'"', debug=True) | 152 self.bot.error(3, 'adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'"', debug=True) |
153 try: | 153 try: |
154 p = Participant(self, from_protocol, nickname, real_jid=real_jid) | 154 p = Participant(self, from_protocol, nickname, real_jid=real_jid) |
155 except: | 155 except: |
156 self.bot.error(3, 'unknown error while adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'"', debug=True) | 156 self.bot.error(say_levels.debug, 'unknown error while adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'"\n'+traceback.format_exc()) |
157 traceback.print_exc() | |
158 return | 157 return |
159 self.lock.acquire() | 158 self.lock.acquire() |
160 self.participants.append(p) | 159 self.participants.append(p) |
161 self.lock.release() | 160 self.lock.release() |
162 if self.mode not in ['normal', 'bypass']: | 161 if self.mode not in ['normal', 'bypass']: |
333 elif left_protocol == 'irc': | 332 elif left_protocol == 'irc': |
334 if self.mode == 'minimal': | 333 if self.mode == 'minimal': |
335 self.show_participants_list_on(protocols=['xmpp']) | 334 self.show_participants_list_on(protocols=['xmpp']) |
336 | 335 |
337 else: | 336 else: |
338 self.bot.error(1, 'Bad decision tree, p.protocol='+p.protocol+' left_protocol='+left_protocol+'\np.xmpp_c='+str(p.xmpp_c)+'\np.irc_connection='+str(p.irc_connection), debug=True) | 337 self.bot.error(say_levels.debug, 'Bad decision tree, p.protocol='+p.protocol+' left_protocol='+left_protocol+'\np.xmpp_c='+str(p.xmpp_c)+'\np.irc_connection='+str(p.irc_connection), send_to_admins=True) |
339 | 338 |
340 | 339 |
341 def restart(self, log=True): | 340 def restart(self, log=True): |
342 """Restart the bridge""" | 341 """Restart the bridge""" |
343 | 342 |