diff options
author | emkael <emkael@tlen.pl> | 2019-08-07 00:22:44 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-08-07 00:22:44 +0200 |
commit | 94e984b88a60fd146951a7e798573c503aafaf43 (patch) | |
tree | 0fcc61b9dbe6f240d38fc8a30129d8c875febf12 /jfr_playoff/gui/logframe.py | |
parent | 46a936418168504db10a5827aad6448c6893ccf9 (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.py | 2 |
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 |