[damned-lies] Ensure utf-8 encoding while reading makefile



commit e154d9910d81a0fbc8c776f0825c6a896cb36c24
Author: Claude Paroz <claude 2xlibre net>
Date:   Tue Jun 27 22:56:24 2017 +0200

    Ensure utf-8 encoding while reading makefile

 stats/utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index dc98afb..0076272 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -115,7 +115,7 @@ class MakefileWrapper:
     @cached_property
     def content(self):
         try:
-            with open(self.path, "r") as fh:
+            with open(self.path, mode='r', encoding='utf-8') as fh:
                 content = fh.read()
         except IOError:
             return None


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]