[diffoscope] 02/02: Open debian/control file in binary mode

Jérémy Bobbio lunar at moszumanska.debian.org
Sun Jan 24 18:47:51 CET 2016


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository diffoscope.

commit 00b26a68bd3e7a7e4d3b7a96f266b605e9b1de7b
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sun Jan 24 18:46:37 2016 +0100

    Open debian/control file in binary mode
    
    This avoid decoding errors and fixes handling of glob2.
    
    Closes: #812524
---
 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 2845f0d..e8ed3f2 100644
--- a/diffoscope/comparators/deb.py
+++ b/diffoscope/comparators/deb.py
@@ -81,7 +81,7 @@ class DebFile(File):
         if not hasattr(self, '_control'):
             control_file = self.as_container.lookup_file('control.tar.gz', 'control.tar', './control')
             if control_file:
-                with open(control_file.path) as f:
+                with open(control_file.path, 'rb') as f:
                     self._control = deb822.Deb822(f)
         return self._control
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list