Changeset 53:fd2b3f70b221 in ralphm-patches for request-stanza.patch


Ignore:
Timestamp:
Aug 3, 2011, 9:48:58 AM (11 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Message:

Small cleanups for request handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • request-stanza.patch

    r47 r53  
    11# HG changeset patch
    2 # Parent cddd993198e15f928c472d299e3351b8802e3608
     2# Parent 02050b16f4310d9875ae26fbe70ec31415a5d829
    33Add base class for IQ get/set request stanzas: Request.
    44
    5 diff -r cddd993198e1 wokkel/generic.py
    6 --- a/wokkel/generic.py Fri Mar 04 09:48:19 2011 +0100
    7 +++ b/wokkel/generic.py Fri Mar 04 09:49:28 2011 +0100
    8 @@ -236,6 +236,27 @@
     5diff -r 02050b16f431 wokkel/generic.py
     6--- a/wokkel/generic.py Wed Aug 03 09:00:34 2011 +0200
     7+++ b/wokkel/generic.py Wed Aug 03 09:14:08 2011 +0200
     8@@ -236,6 +236,34 @@
    99         self.exception = error.exceptionFromStanza(element)
    1010 
    1111 
    1212+class Request(Stanza):
     13+    """
     14+    IQ request stanza.
     15+
     16+    This is a base class for IQ get or set stanzas, to be used with
     17+    L{wokkel.subprotocols.StreamManager.request}.
     18+    """
     19+
    1320+    stanzaKind = 'iq'
    1421+    stanzaType = 'get'
    1522+    timeout = None
    1623+
    17 +    def __init__(self, stanzaType='get', recipient=None, sender=None):
     24+    def __init__(self, recipient=None, sender=None, stanzaType='get'):
    1825+        Stanza.__init__(self, recipient=recipient, sender=sender)
    1926+        self.stanzaType = stanzaType
     
    3441     protocol = xmlstream.XmlStream
    3542 
    36 diff -r cddd993198e1 wokkel/test/test_generic.py
    37 --- a/wokkel/test/test_generic.py       Fri Mar 04 09:48:19 2011 +0100
    38 +++ b/wokkel/test/test_generic.py       Fri Mar 04 09:49:28 2011 +0100
     43diff -r 02050b16f431 wokkel/test/test_generic.py
     44--- a/wokkel/test/test_generic.py       Wed Aug 03 09:00:34 2011 +0200
     45+++ b/wokkel/test/test_generic.py       Wed Aug 03 09:14:08 2011 +0200
    3946@@ -7,6 +7,7 @@
    4047 
Note: See TracChangeset for help on using the changeset viewer.