From ba379aee5160fa782b3208fde3fece1b35507e6d Mon Sep 17 00:00:00 2001 From: Simon Oldfield Date: Fri, 12 Oct 2018 11:29:23 +1100 Subject: [PATCH] Fix issue with sending mail on download failure due to binary file read --- fetch/_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch/_core.py b/fetch/_core.py index 351f8ff..42123dc 100644 --- a/fetch/_core.py +++ b/fetch/_core.py @@ -503,7 +503,7 @@ def on_process_failure(self, process): if process.exitcode < 0: return - with open(process.log_file, 'rb') as f: + with open(process.log_file, 'rt') as f: msg = f.read() self._send_mail(msg, process.name)