From 432afa025ee466cf316e7a61490c60f9a979c777 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 3 May 2019 20:46:59 +0200 Subject: [PATCH] plugin XEP-0329: correctly handle error if something is wrong when getting file from component. --- sat/plugins/plugin_xep_0329.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sat/plugins/plugin_xep_0329.py b/sat/plugins/plugin_xep_0329.py index bda271e8..93f42933 100644 --- a/sat/plugins/plugin_xep_0329.py +++ b/sat/plugins/plugin_xep_0329.py @@ -580,6 +580,13 @@ class XEP_0329(object): except exceptions.NotFound: self._iqError(client, iq_elt) return + except exceptions.PermissionError: + self._iqError(client, iq_elt, condition='not-allowed') + return + except Exception as e: + log.error(u"internal server error: {e}".format(e=e)) + self._iqError(client, iq_elt, condition='internal-server-error') + return iq_result_elt = xmlstream.toResponse(iq_elt, "result") query_elt = iq_result_elt.addElement((NS_FIS, "query")) query_elt[u"node"] = node_path