mirror of
https://github.com/akissinger/dodo.git
synced 2024-10-03 22:17:15 +03:00
Improve output on send exception
- Fix the stray "f" inside the string breaking the color - Don't hide the traceback from the user, as it's impossibe to track down issues without it ("exception: None"?!) - HTML escape the exception message - while somewhat unlikely, it could contain HTML characters.
This commit is contained in:
parent
503763c4d7
commit
cfcfe7ca29
@ -31,6 +31,7 @@ import email.policy
|
||||
import email.message
|
||||
import mimetypes
|
||||
import subprocess
|
||||
import traceback
|
||||
from subprocess import PIPE, Popen, TimeoutExpired
|
||||
import tempfile
|
||||
import typing
|
||||
@ -460,4 +461,6 @@ class SendmailThread(QThread):
|
||||
except TimeoutExpired:
|
||||
self.panel.status = f'<i style="color:{settings.theme["fg_bad"]}">timed out</i>'
|
||||
except Exception as e:
|
||||
self.panel.status = f'<i style=f"color:{settings.theme["fg_bad"]}">exception {e}</i>'
|
||||
msg = util.simple_escape(str(e))
|
||||
self.panel.status = f'<i style="color:{settings.theme["fg_bad"]}">exception {msg} (traceback on stderr)</i>'
|
||||
traceback.print_exc()
|
||||
|
Loading…
Reference in New Issue
Block a user