source: ralphm-patches/disco_warning.patch @ 57:0d8b6cf41728

Last change on this file since 57:0d8b6cf41728 was 57:0d8b6cf41728, checked in by Ralph Meijer <ralphm@…>, 10 years ago

Wokkel 0.7.0 release, clean up various patches.

File size: 813 bytes
RevLine 
[47]1# HG changeset patch
[57]2# Parent 46b33f13f14214ec900a189348a21824d915212a
3
4diff -r 46b33f13f142 wokkel/pubsub.py
5--- a/wokkel/pubsub.py  Wed Mar 28 13:24:00 2012 +0200
6+++ b/wokkel/pubsub.py  Wed Mar 28 13:24:14 2012 +0200
[47]7@@ -10,6 +10,8 @@
[57]8 U{XEP-0060<http://xmpp.org/extensions/xep-0060.html>}.
[47]9 """
10 
11+import warnings
12+
13 from zope.interface import implements
14 
15 from twisted.internet import defer
[57]16@@ -1103,6 +1105,8 @@
[47]17             if not nodeInfo:
18                 return
19 
20+            if 'meta-data' in nodeInfo and 'type' in nodeInfo:
21+                warnings.warn("passing node info using key 'meta-data' is deprecated", DeprecationWarning)
22             (nodeType, metaData) = nodeInfo['type'], nodeInfo['meta-data']
23             info.append(disco.DiscoIdentity('pubsub', nodeType))
24             if metaData:
Note: See TracBrowser for help on using the repository browser.