Ignore:
Timestamp:
Oct 3, 2016, 8:49:10 AM (4 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
rebase_source:
77cb4411a2525cb7b972b664a751e11c11b7cf65
Message:

imported patch py3-subprotocols.patch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/subprotocols.py

    r166 r194  
    88"""
    99
    10 __all__ = ['XMPPHandler', 'XMPPHandlerCollection', 'StreamManager',
    11            'IQHandlerMixin']
    12 
    13 from zope.interface import implements
     10from __future__ import division, absolute_import
     11
     12from zope.interface import implementer
    1413
    1514from twisted.internet import defer
    1615from twisted.internet.error import ConnectionDone
    1716from twisted.python import failure, log
     17from twisted.python.compat import iteritems, itervalues
    1818from twisted.python.deprecate import deprecatedModuleAttribute
    1919from twisted.python.versions import Version
     
    3131        "XMPPHandlerCollection")
    3232
     33@implementer(ijabber.IXMPPHandler)
    3334class XMPPHandler(object):
    3435    """
     
    3839    extension protocols, and are referred to as a subprotocol implementation.
    3940    """
    40 
    41     implements(ijabber.IXMPPHandler)
    4241
    4342    def __init__(self):
     
    278277        iqDeferreds = self._iqDeferreds
    279278        self._iqDeferreds = {}
    280         for d in iqDeferreds.itervalues():
     279        for d in itervalues(iqDeferreds):
    281280            d.errback(reason)
    282281
     
    456455
    457456        handler = None
    458         for queryString, method in self.iqHandlers.iteritems():
     457        for queryString, method in iteritems(self.iqHandlers):
    459458            if xpath.internQuery(queryString).matches(iq):
    460459                handler = getattr(self, method)
     
    473472
    474473        iq.handled = True
     474
     475
     476
     477__all__ = ['XMPPHandler', 'XMPPHandlerCollection', 'StreamManager',
     478           'IQHandlerMixin']
Note: See TracChangeset for help on using the changeset viewer.