Tidy up disco plugin.
This commit is contained in:
parent
e287282782
commit
a104cd6dae
3 changed files with 5 additions and 8 deletions
|
@ -8,13 +8,11 @@
|
|||
|
||||
import logging
|
||||
|
||||
import sleekxmpp
|
||||
from sleekxmpp import Iq
|
||||
from sleekxmpp.exceptions import XMPPError, IqError, IqTimeout
|
||||
from sleekxmpp.plugins import BasePlugin
|
||||
from sleekxmpp.xmlstream.handler import Callback
|
||||
from sleekxmpp.xmlstream.matcher import StanzaPath
|
||||
from sleekxmpp.xmlstream import register_stanza_plugin, ElementBase, ET, JID
|
||||
from sleekxmpp.xmlstream import register_stanza_plugin, JID
|
||||
from sleekxmpp.plugins.xep_0030 import stanza, DiscoInfo, DiscoItems
|
||||
from sleekxmpp.plugins.xep_0030 import StaticDisco
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
See the file LICENSE for copying permission.
|
||||
"""
|
||||
|
||||
from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin
|
||||
from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin
|
||||
|
||||
|
||||
class DiscoItems(ElementBase):
|
||||
|
@ -140,9 +140,11 @@ class DiscoItem(ElementBase):
|
|||
interfaces = set(('jid', 'node', 'name'))
|
||||
|
||||
def get_node(self):
|
||||
"""Return the item's node name or ``None``."""
|
||||
return self._get_attr('node', None)
|
||||
|
||||
def get_name(self):
|
||||
"""Return the item's human readable name, or ``None``."""
|
||||
return self._get_attr('name', None)
|
||||
|
||||
|
||||
|
|
|
@ -9,12 +9,9 @@
|
|||
import logging
|
||||
import threading
|
||||
|
||||
import sleekxmpp
|
||||
from sleekxmpp import Iq
|
||||
from sleekxmpp.exceptions import XMPPError, IqError, IqTimeout
|
||||
from sleekxmpp.xmlstream.handler import Callback
|
||||
from sleekxmpp.xmlstream.matcher import StanzaPath
|
||||
from sleekxmpp.xmlstream import register_stanza_plugin, ElementBase, ET, JID
|
||||
from sleekxmpp.xmlstream import JID
|
||||
from sleekxmpp.plugins.xep_0030 import DiscoInfo, DiscoItems
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue