summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0030.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2009-08-31 22:46:31 +0000
committerNathan Fritz <fritzy@netflint.net>2009-08-31 22:46:31 +0000
commit05c9ea5c1d953637343c9fad07267e7f89b20561 (patch)
treed4b0d432870bb195a4f14ec07ce889fcd080a357 /sleekxmpp/plugins/xep_0030.py
parent00d46ee2b0fe4c0d76525d284dcc7ed588e701af (diff)
downloadslixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.gz
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.bz2
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.xz
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.zip
* converted sleekxmpp to Python 3.x
* sleekxmpp no longer spawns threads for callback handlers -- there are now two threads: one for handlers and one for reading. callback handlers can get results from the read queue directly with the "wait" handler which is used in .send() for the reply catching argument.
Diffstat (limited to 'sleekxmpp/plugins/xep_0030.py')
-rw-r--r--sleekxmpp/plugins/xep_0030.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/sleekxmpp/plugins/xep_0030.py b/sleekxmpp/plugins/xep_0030.py
index d3795308..fc921020 100644
--- a/sleekxmpp/plugins/xep_0030.py
+++ b/sleekxmpp/plugins/xep_0030.py
@@ -17,11 +17,9 @@
along with SleekXMPP; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
-from __future__ import absolute_import, with_statement
from . import base
import logging
from xml.etree import cElementTree as ET
-import thread
class xep_0030(base.base_plugin):
"""
@@ -36,13 +34,11 @@ class xep_0030(base.base_plugin):
self.items = {'main': []}
self.xmpp.add_handler("<iq type='get' xmlns='%s'><query xmlns='http://jabber.org/protocol/disco#info' /></iq>" % self.xmpp.default_ns, self.info_handler)
self.xmpp.add_handler("<iq type='get' xmlns='%s'><query xmlns='http://jabber.org/protocol/disco#items' /></iq>" % self.xmpp.default_ns, self.item_handler)
- self.lock = thread.allocate_lock()
def add_feature(self, feature, node='main'):
- with self.lock:
- if not self.features.has_key(node):
- self.features[node] = []
- self.features[node].append(feature)
+ if not self.features.has_key(node):
+ self.features[node] = []
+ self.features[node].append(feature)
def add_identity(self, category=None, itype=None, name=None, node='main'):
if not self.identities.has_key(node):