From: Johannes Berg Date: Sat, 13 Jun 2020 19:21:44 +0000 (+0200) Subject: index: fix bytes vs. str (py3) for --long output X-Git-Tag: 0.31~48 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=503eccba1d2cb7a980467e15f71a6cee6ed35223;hp=f8e4c63b5431fa689a33c8e99bdd14c4db410cc3 index: fix bytes vs. str (py3) for --long output Signed-off-by: Johannes Berg Reviewed-by: Rob Browning --- diff --git a/lib/cmd/index-cmd.py b/lib/cmd/index-cmd.py index a479ca9..fbaa029 100755 --- a/lib/cmd/index-cmd.py +++ b/lib/cmd/index-cmd.py @@ -319,7 +319,8 @@ if opt['print'] or opt.status or opt.modified: if opt.hash: line += hexlify(ent.sha) + b' ' if opt.long: - line += b'%7s %7s ' % (oct(ent.mode), oct(ent.gitmode)) + line += b'%7s %7s ' % (oct(ent.mode).encode('ascii'), + oct(ent.gitmode).encode('ascii')) out.write(line + (name or b'./') + b'\n') if opt.check and (opt['print'] or opt.status or opt.modified or opt.update):