Changeset 139:d3dd88d429fb for wokkel


Ignore:
Timestamp:
Aug 4, 2011, 9:12:43 PM (9 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
wokkel-muc-client-support-24
Message:

Remove some left over error related classes.

Location:
wokkel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/muc.py

    r138 r139  
    8484
    8585DEFER_TIMEOUT = 30 # basic timeout is 30 seconds
    86 
    87 class NotFound(Exception):
    88     """
    89     """
    90     condition = 'cancel'
    91     mucCondition = 'not-found'
    9286
    9387
     
    525519                                      label='Requested role'))
    526520        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'] = frm
    539         # add muc elements
    540         x = self.addElement('x', NS_MUC)
    541 
    542         # add error
    543         e = error.getElement()
    544         self.addChild(e)
    545521
    546522
     
    753729            # change the state of the room
    754730            room = self._getRoom(occupantJID)
    755             if room is None:
    756                 raise NotFound
    757731            room.state = 'joined'
    758732
     
    776750        else:
    777751            # change the state of the room
    778             room = self._getRoom(occupantJID)
    779             if room is None:
    780                 raise NotFound
    781752            self._removeRoom(occupantJID)
    782753
     
    1003974
    1004975        room = self._getRoom(roomJID)
    1005         if room is None:
    1006             raise NotFound
    1007976
    1008977        # Change the nickname
     
    10581027        """
    10591028        room = self._getRoom(occupantJID)
    1060         if room is None:
    1061             raise NotFound
    10621029
    10631030        p = BasicPresence(to=room.occupantJID)
  • wokkel/test/test_muc.py

    r138 r139  
    1818
    1919from twisted.words.protocols.jabber.xmlstream import toResponse
    20 from twisted.words.protocols.jabber.error import StanzaError
    2120
    2221NS_MUC_ADMIN = 'http://jabber.org/protocol/muc#admin'
Note: See TracChangeset for help on using the changeset viewer.