]> arthur.barton.de Git - bup.git/blobdiff - cmd/get-cmd.py
mux: handle python 3's change to default close_fds=True
[bup.git] / cmd / get-cmd.py
index efeb78fd821f7d8d9caee5217af0a4f8dfd0aa24..809464d617111164cabb3d7527f30af90a8b6c2d 100755 (executable)
@@ -12,10 +12,11 @@ from functools import partial
 from stat import S_ISDIR
 
 from bup import git, client, helpers, vfs
-from bup.compat import wrap_main
+from bup.compat import hexstr, wrap_main
 from bup.git import get_cat_data, parse_commit, walk_object
 from bup.helpers import add_error, debug1, handle_ctrl_c, log, saved_errors
-from bup.helpers import hostname, shstr, tty_width, userfullname, username
+from bup.helpers import hostname, shstr, tty_width
+from bup.pwdgrp import userfullname, username
 from bup.repo import LocalRepo, RemoteRepo
 
 argspec = (
@@ -555,11 +556,11 @@ def resolve_targets(specs, src_repo, dest_repo):
 
 def log_item(name, type, opt, tree=None, commit=None, tag=None):
     if tag and opt.print_tags:
-        print(tag.encode('hex'))
+        print(hexstr(tag))
     if tree and opt.print_trees:
-        print(tree.encode('hex'))
+        print(hexstr(tree))
     if commit and opt.print_commits:
-        print(commit.encode('hex'))
+        print(hexstr(commit))
     if opt.verbose:
         last = ''
         if type in ('root', 'branch', 'save', 'commit', 'tree'):