Changeset 139:d3dd88d429fb for wokkel/muc.py
- Timestamp:
- Aug 4, 2011, 9:12:43 PM (9 years ago)
- Branch:
- wokkel-muc-client-support-24
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wokkel/muc.py
r138 r139 84 84 85 85 DEFER_TIMEOUT = 30 # basic timeout is 30 seconds 86 87 class NotFound(Exception):88 """89 """90 condition = 'cancel'91 mucCondition = 'not-found'92 86 93 87 … … 525 519 label='Requested role')) 526 520 self.addChild(form.toElement()) 527 528 529 530 class PresenceError(xmppim.Presence):531 """532 This behaves like an object providing L{domish.IElement}.533 """534 535 def __init__(self, error, to=None, frm=None):536 xmppim.Presence.__init__(self, to, type='error')537 if frm:538 self['from'] = frm539 # add muc elements540 x = self.addElement('x', NS_MUC)541 542 # add error543 e = error.getElement()544 self.addChild(e)545 521 546 522 … … 753 729 # change the state of the room 754 730 room = self._getRoom(occupantJID) 755 if room is None:756 raise NotFound757 731 room.state = 'joined' 758 732 … … 776 750 else: 777 751 # change the state of the room 778 room = self._getRoom(occupantJID)779 if room is None:780 raise NotFound781 752 self._removeRoom(occupantJID) 782 753 … … 1003 974 1004 975 room = self._getRoom(roomJID) 1005 if room is None:1006 raise NotFound1007 976 1008 977 # Change the nickname … … 1058 1027 """ 1059 1028 room = self._getRoom(occupantJID) 1060 if room is None:1061 raise NotFound1062 1029 1063 1030 p = BasicPresence(to=room.occupantJID)
Note: See TracChangeset
for help on using the changeset viewer.