summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangweichen <weichen.wang@jsxfedu.com>2017-07-13 13:55:49 +0800
committerwangweichen <weichen.wang@jsxfedu.com>2017-07-13 13:55:49 +0800
commit3add9cea092514a82931108bbc05a15355900a52 (patch)
tree4d577eb524c63ee4d8a80c06b377ac177a1a369b
parent4ddd1a3f020c4ed7ee4f281955d31630c716c186 (diff)
downloadgitdb-3add9cea092514a82931108bbc05a15355900a52.tar.gz
fix open encoding error.
-rw-r--r--gitdb/db/ref.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitdb/db/ref.py b/gitdb/db/ref.py
index 2e3db86..84f9f6c 100644
--- a/gitdb/db/ref.py
+++ b/gitdb/db/ref.py
@@ -41,7 +41,7 @@ class ReferenceDB(CompoundDB):
# try to get as many as possible, don't fail if some are unavailable
ref_paths = list()
try:
- with open(self._ref_file, 'r') as f:
+ with open(self._ref_file, 'r', encoding="utf-8") as f:
ref_paths = [l.strip() for l in f]
except (OSError, IOError):
pass