Skip to content

Commit 5e0fea5

Browse files
author
wangweichen
committed
change codecs to open with support encoding="utf-8"
1 parent 3add9ce commit 5e0fea5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitdb/db/ref.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# This module is part of GitDB and is released under
44
# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
5+
import codecs
56
from gitdb.db.base import (
67
CompoundDB,
78
)
@@ -41,7 +42,7 @@ def _update_dbs_from_ref_file(self):
4142
# try to get as many as possible, don't fail if some are unavailable
4243
ref_paths = list()
4344
try:
44-
with open(self._ref_file, 'r', encoding="utf-8") as f:
45+
with codecs.open(self._ref_file, 'r', encoding="utf-8") as f:
4546
ref_paths = [l.strip() for l in f]
4647
except (OSError, IOError):
4748
pass

0 commit comments

Comments
 (0)