# HG changeset patch # User Charly COSTE # Date 1269301356 -3600 # Node ID 7602a0898d195b6172c6ff7143891ebfa1f43f47 # Parent f861a7038ad3084673767175f37595681dd3e2a3 catch irclib.UnknownChannel in Bridge.stop and Bridge.soft_restart Signed-off-by: Charly COSTE diff --git a/bridge.py b/bridge.py --- a/bridge.py +++ b/bridge.py @@ -408,7 +408,10 @@ class Bridge: # Leave if isinstance(self.irc_connection, irclib.ServerConnection) and isinstance(self.xmpp_room, xmpp.muc): - self.irc_connection.part(self.irc_room, message=message) + try: + self.irc_connection.part(self.irc_room, message=message) + except irclib.UnknownChannel: + pass self.xmpp_room.leave(message=message) else: self.stop() @@ -432,7 +435,10 @@ class Bridge: if self.irc_connection.used_by < 1: self.irc_connection.close(message) else: - self.irc_connection.part(self.irc_room, message=message) + try: + self.irc_connection.part(self.irc_room, message=message) + except irclib.UnknownChannel: + pass self.irc_connection = None # Leave the MUC