From: Johannes Berg Date: Sat, 18 Apr 2020 21:28:59 +0000 (+0200) Subject: fsck: stop using .encode('hex') X-Git-Tag: 0.31~86 X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=28d78a7487d860397e1f2fe579a5096af41eb58f fsck: stop using .encode('hex') An error path is using this still, use hexlify() instead. Signed-off-by: Johannes Berg Reviewed-by: Rob Browning --- diff --git a/cmd/fsck-cmd.py b/cmd/fsck-cmd.py index 14a32c8..293024e 100755 --- a/cmd/fsck-cmd.py +++ b/cmd/fsck-cmd.py @@ -10,6 +10,7 @@ import sys, os, glob, subprocess from shutil import rmtree from subprocess import PIPE, Popen from tempfile import mkdtemp +from binascii import hexlify from bup import options, git from bup.compat import argv_bytes @@ -109,7 +110,7 @@ def quick_verify(base): for b in chunkyreader(f, os.fstat(f.fileno()).st_size - 20): sum.update(b) if sum.digest() != wantsum: - raise ValueError('expected %r, got %r' % (wantsum.encode('hex'), + raise ValueError('expected %r, got %r' % (hexlify(wantsum), sum.hexdigest()))