[Reproducible-commits] [diffoscope] 02/05: Read md5sums file using UTF-8
Jérémy Bobbio
lunar at moszumanska.debian.org
Thu Sep 24 09:38:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository diffoscope.
commit 436d9973b78255c9ce90cee9890ae1a20078cb2d
Author: Jérémy Bobbio <lunar at debian.org>
Date: Thu Sep 24 09:13:05 2015 +0000
Read md5sums file using UTF-8
They are supposed to contain file paths. That means they should be UTF-8
encoded, at least on Debian.
---
diffoscope/comparators/deb.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diffoscope/comparators/deb.py b/diffoscope/comparators/deb.py
index 0388ecb..e192b94 100644
--- a/diffoscope/comparators/deb.py
+++ b/diffoscope/comparators/deb.py
@@ -98,7 +98,7 @@ class Md5sumsFile(File):
@staticmethod
def parse_md5sums(path):
d = {}
- with open(path) as f:
+ with open(path, 'r', encoding='utf-8') as f:
for line in f.readlines():
md5sum, path = re.split(r'\s+', line.strip(), maxsplit=1)
d[path] = md5sum
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list