changeset 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 d527d7b75f56
children ca22fdea1c17
files muc.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
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()