# HG changeset patch # User Charly COSTE # Date 1271151962 -7200 # Node ID fa53750576580d062b3e0a8cc1c0f627c4f453ba # Parent 8d01d0597950825d842ac773269669c0c14c5a6a fixed an UnboundLocalError in Bridge._xmpp_join_callback Signed-off-by: Charly COSTE diff --git a/bridge.py b/bridge.py --- a/bridge.py +++ b/bridge.py @@ -125,14 +125,16 @@ class Bridge: else: self.stopped = True self.say(say_levels.error, 'failed to connect to the XMPP room, leaving ...', on_xmpp=False) + trace = '' for error in errors: try: raise error except xmpp.muc.RemoteServerNotFound: self._RemoteServerNotFound_handler() + return except: - trace = traceback.format_exc().splitlines()[-1] - 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) + trace += '\n'+traceback.format_exc().splitlines()[-1] + self.bot.error(say_levels.error, 'failed to connect to the XMPP room of bridge "'+str(self)+'", stopping bridge'+trace, send_to_admins=True) self.stop(message='Failed to connect to the XMPP room, stopping bridge', log=False)