]> arthur.barton.de Git - bup.git/commitdiff
split: switch to print_function
authorRob Browning <rlb@defaultvalue.org>
Thu, 18 Jan 2018 01:57:47 +0000 (19:57 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 7 Jul 2018 17:38:32 +0000 (12:38 -0500)
Python 3 requires it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/split-cmd.py

index 71e365e31b0ecdeb3be8e9d29424bb2f13a84fee..a23a052d4a0a81833d2b06ceeb5255628beef949 100755 (executable)
@@ -5,7 +5,7 @@ exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 import os, sys, time
 
 from bup import hashsplit, git, options, client
@@ -166,7 +166,7 @@ if opt.blobs:
                                        keep_boundaries=opt.keep_boundaries,
                                        progress=prog)
     for (sha, size, level) in shalist:
-        print sha.encode('hex')
+        print(sha.encode('hex'))
         reprogress()
 elif opt.tree or opt.commit or opt.name:
     if opt.name: # insert dummy_name which may be used as a restore target
@@ -197,7 +197,7 @@ else:
 if opt.verbose:
     log('\n')
 if opt.tree:
-    print tree.encode('hex')
+    print(tree.encode('hex'))
 if opt.commit or opt.name:
     msg = 'bup split\n\nGenerated by command:\n%r\n' % sys.argv
     ref = opt.name and ('refs/heads/%s' % opt.name) or None
@@ -205,7 +205,7 @@ if opt.commit or opt.name:
     commit = pack_writer.new_commit(tree, oldref, userline, date, None,
                                     userline, date, None, msg)
     if opt.commit:
-        print commit.encode('hex')
+        print(commit.encode('hex'))
 
 if pack_writer:
     pack_writer.close()  # must close before we can update the ref