mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
bugfix for .disconnect() hanging
This commit is contained in:
parent
fef511fd51
commit
2f9f649d98
2 changed files with 34 additions and 0 deletions
|
@ -318,6 +318,39 @@ class DefaultConfig(ElementBase):
|
|||
|
||||
stanzaPlugin(Pubsub, DefaultConfig)
|
||||
|
||||
class DefaultConfigOwner(ElementBase):
|
||||
namespace = 'http://jabber.org/protocol/pubsub#owner'
|
||||
name = 'default'
|
||||
plugin_attrib = 'default'
|
||||
interfaces = set(('node', 'type', 'config'))
|
||||
plugin_attrib_map = {}
|
||||
plugin_tag_map = {}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
ElementBase.__init__(self, *args, **kwargs)
|
||||
|
||||
def getConfig(self):
|
||||
config = self.xml.find('{jabber:x:data}x')
|
||||
form = xep_0004.Form()
|
||||
if config is not None:
|
||||
form.fromXML(config)
|
||||
return form
|
||||
|
||||
def setConfig(self, value):
|
||||
self.xml.append(value.getXML())
|
||||
return self
|
||||
|
||||
def delConfig(self):
|
||||
config = self.xml.find('{jabber:x:data}x')
|
||||
self.xml.remove(config)
|
||||
|
||||
def getType(self):
|
||||
t = self._getAttr('type')
|
||||
if not t: t == 'leaf'
|
||||
return t
|
||||
|
||||
stanzaPlugin(PubsubOwner, DefaultConfig)
|
||||
|
||||
class Options(ElementBase):
|
||||
namespace = 'http://jabber.org/protocol/pubsub'
|
||||
name = 'options'
|
||||
|
|
|
@ -3,6 +3,7 @@ from . import base
|
|||
import logging
|
||||
#from xml.etree import cElementTree as ET
|
||||
from .. xmlstream.stanzabase import ElementBase, ET
|
||||
from . import stanza_pubsub
|
||||
|
||||
class xep_0060(base.base_plugin):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue