diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-12-26 23:46:20 +0100 |
---|---|---|
committer | Link Mauve <linkmauve@linkmauve.fr> | 2020-12-26 23:54:37 +0100 |
commit | 78b3933e4df6dce474336d75843497740317844e (patch) | |
tree | 92744f7ab7d863a13db64001a98e697af3d73b41 | |
parent | 1c5836a90f957d413b483813bd74e45684609ae1 (diff) | |
download | poezio-78b3933e4df6dce474336d75843497740317844e.tar.gz poezio-78b3933e4df6dce474336d75843497740317844e.tar.bz2 poezio-78b3933e4df6dce474336d75843497740317844e.tar.xz poezio-78b3933e4df6dce474336d75843497740317844e.zip |
Stop displaying the traceback when /xhtml fails.
Also make the except more restrictive.
Fixes #3514.
-rw-r--r-- | poezio/tabs/basetabs.py | 4 |
1 files 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()) |