From 78b3933e4df6dce474336d75843497740317844e Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 26 Dec 2020 23:46:20 +0100 Subject: Stop displaying the traceback when /xhtml fails. Also make the except more restrictive. Fixes #3514. --- poezio/tabs/basetabs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py index 3907d7bc..5e9ba498 100644 --- a/poezio/tabs/basetabs.py +++ b/poezio/tabs/basetabs.py @@ -647,9 +647,9 @@ class ChatTab(Tab): body = xhtml.clean_text( xhtml.xhtml_to_poezio_colors(arg, force=True)) ET.fromstring(arg) - except: + except xml.sax._exceptions.SAXParseException: self.core.information('Could not send custom xhtml', 'Error') - log.error('/xhtml: Unable to send custom xhtml', exc_info=True) + log.error('/xhtml: Unable to send custom xhtml') return msg = self.core.xmpp.make_message(self.get_dest_jid()) -- cgit v1.2.3