comparison sat_frontends/jp/cmd_pubsub.py @ 3586:5f65f4e9f8cb

plugin XEP-0060: getItems extra is now serialised dict
author Goffi <goffi@goffi.org>
date Wed, 28 Jul 2021 23:01:15 +0200
parents 04283582966f
children 1709f0a78f50
comparison
equal deleted inserted replaced
3585:31628770a15a 3586:5f65f4e9f8cb
953 ) 953 )
954 self.host.quit(1) 954 self.host.quit(1)
955 items = [item] if item else [] 955 items = [item] if item else []
956 ps_result = data_format.deserialise( 956 ps_result = data_format.deserialise(
957 await self.host.bridge.psItemsGet( 957 await self.host.bridge.psItemsGet(
958 service, node, 1, items, "", {}, self.profile 958 service, node, 1, items, "", data_format.serialise({}), self.profile
959 ) 959 )
960 ) 960 )
961 item_raw = ps_result["items"][0] 961 item_raw = ps_result["items"][0]
962 parser = etree.XMLParser(remove_blank_text=True, recover=True) 962 parser = etree.XMLParser(remove_blank_text=True, recover=True)
963 item_elt = etree.fromstring(item_raw, parser) 963 item_elt = etree.fromstring(item_raw, parser)
1685 self.args.service, 1685 self.args.service,
1686 self.args.node, 1686 self.args.node,
1687 self.args.rsm_max, 1687 self.args.rsm_max,
1688 self.args.items, 1688 self.args.items,
1689 "", 1689 "",
1690 extra, 1690 data_format.serialise(extra),
1691 self.profile, 1691 self.profile,
1692 ) 1692 )
1693 ) 1693 )
1694 except Exception as e: 1694 except Exception as e:
1695 self.disp(f"can't retrieve items: {e}", error=True) 1695 self.disp(f"can't retrieve items: {e}", error=True)