[Reproducible-commits] [diffoscope] 02/21: Decode hexlify output

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 21 17:39:26 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 ad3f5d2a8ef8d484909e969362042f7fc333dd0c
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Fri Sep 18 15:34:44 2015 +0200

    Decode hexlify output
    
    hexlify actually returns raw bytes, so we need to decode its output.
    
    This changes is required for Python 3 as bytes can't be formatted directly
    in unicode strings.
---
 diffoscope/comparators/binary.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diffoscope/comparators/binary.py b/diffoscope/comparators/binary.py
index 89ff4d1..4ffa734 100644
--- a/diffoscope/comparators/binary.py
+++ b/diffoscope/comparators/binary.py
@@ -51,7 +51,7 @@ def hexdump_fallback(path):
     hexdump = ''
     with open(path, 'rb') as f:
         for buf in iter(lambda: f.read(32), b''):
-            hexdump += u'%s\n' % hexlify(buf)
+            hexdump += u'%s\n' % hexlify(buf).decode('us-ascii')
     return hexdump
 
 

-- 
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