Mercurial > libervia-backend
comparison sat_frontends/jp/cmd_pubsub.py @ 3275:55eeb0dfd313
jp (pubsub): fixed arguments returned when item has no payload
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 18 May 2020 23:43:06 +0200 |
parents | 559a625a236b |
children | 77177b13ff54 |
comparison
equal
deleted
inserted
replaced
3274:430204a3cc10 | 3275:55eeb0dfd313 |
---|---|
909 item_id = item_elt.get("id") | 909 item_id = item_elt.get("id") |
910 try: | 910 try: |
911 payload = item_elt[0] | 911 payload = item_elt[0] |
912 except IndexError: | 912 except IndexError: |
913 self.disp(_("Item has not payload"), 1) | 913 self.disp(_("Item has not payload"), 1) |
914 return "" | 914 return "", item_id |
915 return etree.tostring(payload, encoding="unicode", pretty_print=True), item_id | 915 return etree.tostring(payload, encoding="unicode", pretty_print=True), item_id |
916 | 916 |
917 async def start(self): | 917 async def start(self): |
918 (self.pubsub_service, | 918 (self.pubsub_service, |
919 self.pubsub_node, | 919 self.pubsub_node, |