Python : Fix an error upon failiure to achieve items of a Jabber ID (Thanks. ThUnD3r|Gr33n)
This commit is contained in:
parent
899f87865d
commit
cc1061ecf1
1 changed files with 20 additions and 19 deletions
5
fasi.py
5
fasi.py
|
@ -628,7 +628,7 @@ class FileUtilities:
|
||||||
|
|
||||||
async def cache_jid_data(jabber_id, password, jid_bare, node_name=None, item_id=None, alias=None):
|
async def cache_jid_data(jabber_id, password, jid_bare, node_name=None, item_id=None, alias=None):
|
||||||
|
|
||||||
count = title = ''
|
count = iq_disco_items_list = iq_disco_items_items_list = title = ''
|
||||||
jid_vcard = {
|
jid_vcard = {
|
||||||
'name' : '',
|
'name' : '',
|
||||||
'note' : '',
|
'note' : '',
|
||||||
|
@ -675,6 +675,7 @@ class FileUtilities:
|
||||||
|
|
||||||
# TODO /d/pubsub.nicoco.fr/blog/urn-uuid-53e43061-1962-3112-bb8a-1473dca61719
|
# TODO /d/pubsub.nicoco.fr/blog/urn-uuid-53e43061-1962-3112-bb8a-1473dca61719
|
||||||
jid_items = await XmppXep0030.get_jid_items(xmpp_instance, jid_bare)
|
jid_items = await XmppXep0030.get_jid_items(xmpp_instance, jid_bare)
|
||||||
|
if isinstance(jid_items['iq'], stanza.iq.Iq):
|
||||||
iq = jid_items['iq']
|
iq = jid_items['iq']
|
||||||
iq_disco_items = iq['disco_items']
|
iq_disco_items = iq['disco_items']
|
||||||
iq_disco_items_items = iq_disco_items['items']
|
iq_disco_items_items = iq_disco_items['items']
|
||||||
|
@ -774,7 +775,7 @@ class FileUtilities:
|
||||||
print('Node items')
|
print('Node items')
|
||||||
nodes = {}
|
nodes = {}
|
||||||
#if node_name and node_name in iq_disco_items_set:
|
#if node_name and node_name in iq_disco_items_set:
|
||||||
if node_name and node_name in iq_disco_items_list:
|
if iq_disco_items_list and node_name and node_name in iq_disco_items_list:
|
||||||
action = 'Browse'
|
action = 'Browse'
|
||||||
node_item_ids = await XmppXep0060.get_node_item_ids(xmpp_instance, jid_bare, node_name)
|
node_item_ids = await XmppXep0060.get_node_item_ids(xmpp_instance, jid_bare, node_name)
|
||||||
if isinstance(node_item_ids['iq'], stanza.iq.Iq):
|
if isinstance(node_item_ids['iq'], stanza.iq.Iq):
|
||||||
|
|
Loading…
Reference in a new issue