Better handle results that don't decode to UTF-8.

This commit is contained in:
Andrew Hamilton 2019-07-17 22:33:48 +10:00
parent 81e19a2062
commit e98f1640bf

View file

@ -696,6 +696,8 @@ def run_tool_no_error(path, tool):
status, result = tool(path)
except subprocess.TimeoutExpired:
status, result = Status.timed_out, fill3.Text("Timed out")
except UnicodeDecodeError:
status, result = Status.not_applicable, fill3.Text("Result not in UTF-8")
except:
status, result = Status.error, _syntax_highlight(
traceback.format_exc(), pygments.lexers.PythonTracebackLexer(),