Mercurial > xib
comparison bridge.py @ 274:fa5375057658
fixed an UnboundLocalError in Bridge._xmpp_join_callback
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Tue, 13 Apr 2010 11:46:02 +0200 |
parents | 7640a3feddf5 |
children |
comparison
equal
deleted
inserted
replaced
273:8d01d0597950 | 274:fa5375057658 |
---|---|
123 self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) | 123 self.bot.error(3, 'succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True) |
124 self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+self.mode+' mode', on_irc=False) | 124 self.say(say_levels.notice, 'bridge "'+str(self)+'" is running in '+self.mode+' mode', on_irc=False) |
125 else: | 125 else: |
126 self.stopped = True | 126 self.stopped = True |
127 self.say(say_levels.error, 'failed to connect to the XMPP room, leaving ...', on_xmpp=False) | 127 self.say(say_levels.error, 'failed to connect to the XMPP room, leaving ...', on_xmpp=False) |
128 trace = '' | |
128 for error in errors: | 129 for error in errors: |
129 try: | 130 try: |
130 raise error | 131 raise error |
131 except xmpp.muc.RemoteServerNotFound: | 132 except xmpp.muc.RemoteServerNotFound: |
132 self._RemoteServerNotFound_handler() | 133 self._RemoteServerNotFound_handler() |
134 return | |
133 except: | 135 except: |
134 trace = traceback.format_exc().splitlines()[-1] | 136 trace += '\n'+traceback.format_exc().splitlines()[-1] |
135 self.bot.error(say_levels.error, 'failed to connect to the XMPP room of bridge "'+str(self)+'", stopping bridge\n'+trace, send_to_admins=True) | 137 self.bot.error(say_levels.error, 'failed to connect to the XMPP room of bridge "'+str(self)+'", stopping bridge'+trace, send_to_admins=True) |
136 self.stop(message='Failed to connect to the XMPP room, stopping bridge', log=False) | 138 self.stop(message='Failed to connect to the XMPP room, stopping bridge', log=False) |
137 | 139 |
138 | 140 |
139 def add_participant(self, from_protocol, nickname, real_jid=None): | 141 def add_participant(self, from_protocol, nickname, real_jid=None): |
140 """Add a participant to the bridge.""" | 142 """Add a participant to the bridge.""" |