summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/logframe.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-08-07 00:22:44 +0200
committeremkael <emkael@tlen.pl>2019-08-07 00:22:44 +0200
commit94e984b88a60fd146951a7e798573c503aafaf43 (patch)
tree0fcc61b9dbe6f240d38fc8a30129d8c875febf12 /jfr_playoff/gui/logframe.py
parent46a936418168504db10a5827aad6448c6893ccf9 (diff)
Encoding/decoding non-ASCII OS errors in GUI log handler
Diffstat (limited to 'jfr_playoff/gui/logframe.py')
-rw-r--r--jfr_playoff/gui/logframe.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/jfr_playoff/gui/logframe.py b/jfr_playoff/gui/logframe.py
index 74ffca1..078226e 100644
--- a/jfr_playoff/gui/logframe.py
+++ b/jfr_playoff/gui/logframe.py
@@ -62,6 +62,8 @@ class LogWindow(tk.Toplevel):
def addRecord(self, record):
self._counter += 1
self._records.append((record, datetime.datetime.now()))
+ if not isinstance(record.message, unicode):
+ record.message = unicode(record.message, errors='replace')
self.logList.insert(
'', tk.END, tag=self._counter, values=[
record.levelname, record.name, record.message