summaryrefslogtreecommitdiff
path: root/src/xhtml.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-08-03 19:27:25 +0200
committermathieui <mathieui@mathieui.net>2013-08-03 19:27:25 +0200
commit31c2e23c4c3e2933952d5851bd5c97eb336258dd (patch)
treecb0ea7fe4d749c8a47e0457b42bbf9353fa24926 /src/xhtml.py
parentc2f6ece39db14ba87ad33d6a7103193cf2e64050 (diff)
downloadpoezio-31c2e23c4c3e2933952d5851bd5c97eb336258dd.tar.gz
poezio-31c2e23c4c3e2933952d5851bd5c97eb336258dd.tar.bz2
poezio-31c2e23c4c3e2933952d5851bd5c97eb336258dd.tar.xz
poezio-31c2e23c4c3e2933952d5851bd5c97eb336258dd.zip
Logs errors by default, in a dedicated file
- log_errors option, true by default - errors go in log_dir/errors.log (so $XDG_DATA_HOME/errors.log by default) This should help a lot for debugging, and provide a way for people to easily give debug traces without useless or personal infos.
Diffstat (limited to 'src/xhtml.py')
-rw-r--r--src/xhtml.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xhtml.py b/src/xhtml.py
index f95f3a15..7a3d4da5 100644
--- a/src/xhtml.py
+++ b/src/xhtml.py
@@ -229,8 +229,8 @@ def xhtml_to_poezio_colors(xml):
if isinstance(xml, str):
try:
xml = ET.fromstring(xml)
- except cElementTree.ParserError as e:
- log.error("Error decoding XML: [%s] (%s)" % (xml, e))
+ except:
+ log.error("Error decoding XML: [%s]", repr(xml), exc_info=True)
return ""
def parse_css(css):
def get_color(value):