From: Rob Browning Date: Sun, 14 Aug 2022 18:29:09 +0000 (-0500) Subject: index: restore print format of octal mode and gitmode X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=86d1da7306742fca16d912618c7b9a026a2bef34 index: restore print format of octal mode and gitmode Since python 3 changed oct() to add a 0o prefix. Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/lib/bup/cmd/index.py b/lib/bup/cmd/index.py index 9bc4f2a..2f8c608 100644 --- a/lib/bup/cmd/index.py +++ b/lib/bup/cmd/index.py @@ -308,8 +308,7 @@ def main(argv): if opt.hash: line += hexlify(ent.sha) + b' ' if opt.long: - line += b'%7s %7s ' % (oct(ent.mode).encode('ascii'), - oct(ent.gitmode).encode('ascii')) + line += f'{ent.mode:07o} {ent.gitmode:07o} '.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):