comparison 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
comparison
equal deleted inserted replaced
216:d527d7b75f56 217:45065f6f674c
152 def leave(self, message=''): 152 def leave(self, message=''):
153 """Leave the room""" 153 """Leave the room"""
154 self.xmpp_c.lock.acquire() 154 self.xmpp_c.lock.acquire()
155 self.auto_reconnect = False 155 self.auto_reconnect = False
156 s = xmpp.protocol.Presence(to=self.jid, typ='unavailable', status=message) 156 s = xmpp.protocol.Presence(to=self.jid, typ='unavailable', status=message)
157 self._send(s) 157 try:
158 self._send(s)
159 except self.NotConnected:
160 pass
158 self.connected = False 161 self.connected = False
159 self.xmpp_c.lock.release() 162 self.xmpp_c.lock.release()
160 163
161 164
162 def rejoin(self, callback=None): 165 def rejoin(self, callback=None):