diff muc.py @ 217:45065f6f674c

(muc) ignore NotConnected exception in leave method Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sat, 06 Mar 2010 23:19:17 +0100
parents 0c99d38b84b8
children a434b73bde51
line wrap: on
line diff
--- a/muc.py
+++ b/muc.py
@@ -154,7 +154,10 @@ class muc:
 		self.xmpp_c.lock.acquire()
 		self.auto_reconnect = False
 		s = xmpp.protocol.Presence(to=self.jid, typ='unavailable', status=message)
-		self._send(s)
+		try:
+			self._send(s)
+		except self.NotConnected:
+			pass
 		self.connected = False
 		self.xmpp_c.lock.release()