]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/fsck-cmd.py
Prefer python 3, and mention intent to drop python 2 support
[bup.git] / lib / cmd / fsck-cmd.py
index 035300d16d694e797f31879a16ff367a9c328bae..54b91f43a76b92b159c2f9ea057de0d950823ce9 100755 (executable)
@@ -9,18 +9,20 @@ for arg in "$@"; do
     arg_i=$((arg_i + 1))
 done
 # Here to end of preamble replaced during install
-bup_python="$(dirname "$0")/bup-python" || exit $?
+bup_python="$(dirname "$0")/../../config/bin/python" || exit $?
 exec "$bup_python" "$0"
 """
 # end of bup preamble
 
 from __future__ import absolute_import, print_function
-import sys, os, glob, subprocess
+import os, glob, subprocess, sys
 from shutil import rmtree
 from subprocess import PIPE, Popen
 from tempfile import mkdtemp
 from binascii import hexlify
 
+sys.path[:0] = [os.path.dirname(os.path.realpath(__file__)) + '/..']
+
 from bup import compat, options, git
 from bup.compat import argv_bytes
 from bup.helpers import Sha1, chunkyreader, istty2, log, progress
@@ -208,7 +210,7 @@ if opt.disable_par2:
 git.check_repo_or_die()
 
 if extra:
-    extra = [argv_byes(x) for x in extra]
+    extra = [argv_bytes(x) for x in extra]
 else:
     debug('fsck: No filenames given: checking all packs.\n')
     extra = glob.glob(git.repo(b'objects/pack/*.pack'))