]> arthur.barton.de Git - bup.git/blobdiff - cmd/ls-cmd.py
get: adjust for python 3 and test there
[bup.git] / cmd / ls-cmd.py
index 913dab78d5bd585ff225f2392cff0996eba6860f..28ecc535113d40d49c90b83db87757d9af99ceac 100755 (executable)
@@ -5,13 +5,17 @@ exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
 
+from __future__ import absolute_import
 import sys
 
 from bup import git, ls
+from bup.io import byte_stream
 
 
 git.check_repo_or_die()
 
+sys.stdout.flush()
+out = byte_stream(sys.stdout)
 # Check out lib/bup/ls.py for the opt spec
-rc = ls.do_ls(sys.argv[1:], default='/', spec_prefix='bup ')
+rc = ls.via_cmdline(sys.argv[1:], out=out)
 sys.exit(rc)