source: ralphm-patches/disco_warning.patch @ 47:f6d222b68f1c

Last change on this file since 47:f6d222b68f1c was 47:f6d222b68f1c, checked in by Ralph Meijer <ralphm@…>, 11 years ago

Many new patches, upstreamed affiliations and worked on pubsub item.
Upstreamed pubsub_manage_affiliations

File size: 832 bytes
RevLine 
[47]1# HG changeset patch
2# Parent 2d57501b5c68d776489bdb9558b41c446c7c56f1
3diff -r 2d57501b5c68 -r f9bd41295efe wokkel/pubsub.py
4--- a/wokkel/pubsub.py  Fri Feb 18 20:38:19 2011 +0100
5+++ b/wokkel/pubsub.py  Sat Feb 19 08:35:11 2011 +0100
6@@ -10,6 +10,8 @@
7 U{XEP-0060<http://www.xmpp.org/extensions/xep-0060.html>}.
8 """
9 
10+import warnings
11+
12 from zope.interface import implements
13 
14 from twisted.internet import defer
15@@ -1091,6 +1093,8 @@
16             if not nodeInfo:
17                 return
18 
19+            if 'meta-data' in nodeInfo and 'type' in nodeInfo:
20+                warnings.warn("passing node info using key 'meta-data' is deprecated", DeprecationWarning)
21             (nodeType, metaData) = nodeInfo['type'], nodeInfo['meta-data']
22             info.append(disco.DiscoIdentity('pubsub', nodeType))
23             if metaData:
Note: See TracBrowser for help on using the repository browser.