Mercurial > xib
comparison muc.py @ 244:9b83cdd51523
(muc) minor change in NotConnected error message
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Mon, 08 Mar 2010 18:29:41 +0100 |
parents | a434b73bde51 |
children | f14b32e7fdb5 |
comparison
equal
deleted
inserted
replaced
243:c9652650d5b5 | 244:9b83cdd51523 |
---|---|
50 """Send a stanza. | 50 """Send a stanza. |
51 | 51 |
52 The "force" optional argument bypasses the fact that we are not in the room yet, necessary to send initial presence""" | 52 The "force" optional argument bypasses the fact that we are not in the room yet, necessary to send initial presence""" |
53 | 53 |
54 if not self.connected and not force: | 54 if not self.connected and not force: |
55 raise self.NotConnected, stanza.__str__(fancy=1).encode('utf-8') | 55 raise self.NotConnected, self.jid+'\n'+stanza.__str__(fancy=1).encode('utf-8') |
56 try: | 56 try: |
57 self.xmpp_c.send(stanza) | 57 self.xmpp_c.send(stanza) |
58 except IOError, xmpp.Conflict: | 58 except IOError, xmpp.Conflict: |
59 if not self.auto_reconnect: | 59 if not self.auto_reconnect: |
60 raise self.NotConnected, stanza.__str__(fancy=1).encode('utf-8') | 60 raise self.NotConnected, self.jid+'\n'+stanza.__str__(fancy=1).encode('utf-8') |
61 | 61 |
62 self.xmpp_c.reconnectAndReauth() | 62 self.xmpp_c.reconnectAndReauth() |
63 for m in self.xmpp_c.mucs: | 63 for m in self.xmpp_c.mucs: |
64 m.rejoin() | 64 m.rejoin() |
65 self.xmpp_c.send(stanza) | 65 self.xmpp_c.send(stanza) |