Mercurial > libervia-backend
diff frontends/src/jp/cmd_pubsub.py @ 2280:4bc9a2c2d6c9
jp (pubsub, common): fixed last item edition (keep item id instead of creating a new one)
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 28 Jun 2017 20:28:24 +0200 |
parents | e2f96cd1887b |
children | 4af1805cc6df |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_pubsub.py Wed Jun 28 19:19:08 2017 +0200 +++ b/frontends/src/jp/cmd_pubsub.py Wed Jun 28 20:28:24 2017 +0200 @@ -331,12 +331,13 @@ item_raw = self.host.bridge.psItemsGet(service, node, 1, items, "", {}, self.profile)[0][0] parser = etree.XMLParser(remove_blank_text=True) item_elt = etree.fromstring(item_raw, parser) + item_id = item_elt.get('id') try: payload = item_elt[0] except IndexError: self.disp(_(u'Item has not payload'), 1) return u'' - return etree.tostring(payload, encoding="unicode", pretty_print=True) + return etree.tostring(payload, encoding="unicode", pretty_print=True), item_id def start(self): self.pubsub_service, self.pubsub_node, self.pubsub_item, content_file_path, content_file_obj = self.getItemPath(self.args.item)