Changeset 53:fd2b3f70b221 in ralphm-patches for disco-addressing.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
  • disco-addressing.patch

    r47 r53  
    11# HG changeset patch
    2 # Parent ec507e96d825c087430df236727e6f6161d8af12
     2# Parent 038fd78ebd5cdc8d25d00e4bc33a0c263eed277a
    33Reimplement _DiscoRequest as generic.Request.
    44
     
    66Fixes: #73.
    77
    8 diff -r ec507e96d825 wokkel/disco.py
    9 --- a/wokkel/disco.py   Fri Mar 04 09:49:28 2011 +0100
    10 +++ b/wokkel/disco.py   Mon Mar 07 19:08:18 2011 +0100
    11 @@ -14,7 +14,7 @@
     8diff -r 038fd78ebd5c wokkel/disco.py
     9--- a/wokkel/disco.py   Wed Aug 03 09:14:08 2011 +0200
     10+++ b/wokkel/disco.py   Wed Aug 03 09:26:08 2011 +0200
     11@@ -14,8 +14,7 @@
    1212 from twisted.words.protocols.jabber import error, jid
    1313 from twisted.words.xish import domish
    1414 
    1515-from wokkel import data_form
     16-from wokkel.compat import IQ
    1617+from wokkel import data_form, generic
    17  from wokkel.compat import IQ
    1818 from wokkel.iwokkel import IDisco
    1919 from wokkel.subprotocols import IQHandlerMixin, XMPPHandler
    20 @@ -346,26 +346,56 @@
     20 
     21@@ -346,26 +345,57 @@
    2122 
    2223 
     
    6061+    def __init__(self, verb=None, nodeIdentifier='',
    6162+                       recipient=None, sender=None):
    62 +        generic.Request.__init__(self, 'get', recipient, sender)
     63+        generic.Request.__init__(self, recipient=recipient, sender=sender,
     64+                                       stanzaType='get')
    6365+        self.verb = verb
    6466+        self.nodeIdentifier = nodeIdentifier
     
    177179         return d
    178180 
    179 diff -r ec507e96d825 wokkel/generic.py
    180 --- a/wokkel/generic.py Fri Mar 04 09:49:28 2011 +0100
    181 +++ b/wokkel/generic.py Mon Mar 07 19:08:18 2011 +0100
     181diff -r 038fd78ebd5c wokkel/generic.py
     182--- a/wokkel/generic.py Wed Aug 03 09:14:08 2011 +0200
     183+++ b/wokkel/generic.py Wed Aug 03 09:26:08 2011 +0200
    182184@@ -20,7 +20,6 @@
    183185 except ImportError:
     
    205207     stanzaID = None
    206208     stanzaType = None
    207 diff -r ec507e96d825 wokkel/test/test_disco.py
    208 --- a/wokkel/test/test_disco.py Fri Mar 04 09:49:28 2011 +0100
    209 +++ b/wokkel/test/test_disco.py Mon Mar 07 19:08:18 2011 +0100
     209diff -r 038fd78ebd5c wokkel/test/test_disco.py
     210--- a/wokkel/test/test_disco.py Wed Aug 03 09:14:08 2011 +0200
     211+++ b/wokkel/test/test_disco.py Wed Aug 03 09:26:08 2011 +0200
    210212@@ -477,9 +477,14 @@
    211213         Set up stub and protocol for testing.
Note: See TracChangeset for help on using the changeset viewer.