[diffoscope] 01/02: Fix recognizes() for files ending in .buildinfo but without a Checksums-Sha256 field

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 af6bcf80b93bf9eb45f2bcd2330cd1a4cf4c49d7
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sun Jan 24 17:37:22 2016 +0000

    Fix recognizes() for files ending in .buildinfo but without a Checksums-Sha256 field
    
    This prevented diffoscope to compare python3.4.
---
 diffoscope/comparators/debian.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/diffoscope/comparators/debian.py b/diffoscope/comparators/debian.py
index 298ccc2..9c12f3d 100644
--- a/diffoscope/comparators/debian.py
+++ b/diffoscope/comparators/debian.py
@@ -182,6 +182,8 @@ class DotBuildinfoFile(DebControlFile):
         with open(file.path, 'rb') as f:
             # We can parse .buildinfo just like .dsc
             buildinfo = Dsc(f)
+            if not 'Checksums-Sha256' in buildinfo:
+                return False
             for d in buildinfo.get('Checksums-Sha256'):
                 sha256 = hashlib.sha256()
                 # XXX: this will not work for containers

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


More information about the diffoscope mailing list