]> arthur.barton.de Git - bup.git/commitdiff
index: fix bytes vs. str (py3) for --long output
authorJohannes Berg <johannes@sipsolutions.net>
Sat, 13 Jun 2020 19:21:44 +0000 (21:21 +0200)
committerRob Browning <rlb@defaultvalue.org>
Sun, 5 Jul 2020 16:16:22 +0000 (11:16 -0500)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
lib/cmd/index-cmd.py

index a479ca9427a7b768ef763aa0cdfe249091d96ace..fbaa0299f2d1eab9d7676ffcd1a0da128b6940dd 100755 (executable)
@@ -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):