From 05c9ea5c1d953637343c9fad07267e7f89b20561 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Mon, 31 Aug 2009 22:46:31 +0000 Subject: * 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. --- sleekxmpp/plugins/xep_0030.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'sleekxmpp/plugins/xep_0030.py') 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("" % self.xmpp.default_ns, self.info_handler) self.xmpp.add_handler("" % 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): -- cgit v1.2.3