From b094d7c5570cd97d43f4f8b1766c60476da07491 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Wed, 17 Jan 2018 19:57:47 -0600 Subject: [PATCH 1/1] split: switch to print_function Python 3 requires it. Signed-off-by: Rob Browning Tested-by: Rob Browning --- cmd/split-cmd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/split-cmd.py b/cmd/split-cmd.py index 71e365e..a23a052 100755 --- a/cmd/split-cmd.py +++ b/cmd/split-cmd.py @@ -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 -- 2.39.2