Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0329.py @ 2937:db0890c9c7db
plugin XEP-0329: correctly handle error if something is wrong when getting file from component.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 03 May 2019 20:46:59 +0200 |
parents | 1fd3ecb3351a |
children | ab2696e34d29 |
comparison
equal
deleted
inserted
replaced
2936:782612c7854b | 2937:db0890c9c7db |
---|---|
578 client, peer_jid=peer_jid, path=node_path, owner=owner | 578 client, peer_jid=peer_jid, path=node_path, owner=owner |
579 ) | 579 ) |
580 except exceptions.NotFound: | 580 except exceptions.NotFound: |
581 self._iqError(client, iq_elt) | 581 self._iqError(client, iq_elt) |
582 return | 582 return |
583 except exceptions.PermissionError: | |
584 self._iqError(client, iq_elt, condition='not-allowed') | |
585 return | |
586 except Exception as e: | |
587 log.error(u"internal server error: {e}".format(e=e)) | |
588 self._iqError(client, iq_elt, condition='internal-server-error') | |
589 return | |
583 iq_result_elt = xmlstream.toResponse(iq_elt, "result") | 590 iq_result_elt = xmlstream.toResponse(iq_elt, "result") |
584 query_elt = iq_result_elt.addElement((NS_FIS, "query")) | 591 query_elt = iq_result_elt.addElement((NS_FIS, "query")) |
585 query_elt[u"node"] = node_path | 592 query_elt[u"node"] = node_path |
586 if not self.host.trigger.point( | 593 if not self.host.trigger.point( |
587 u"XEP-0329_compGetFilesFromNode", client, iq_elt, owner, node_path, files_data | 594 u"XEP-0329_compGetFilesFromNode", client, iq_elt, owner, node_path, files_data |