]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/midx-cmd.py
Use pytest item results to preserve tmpdirs on failure
[bup.git] / lib / cmd / midx-cmd.py
index 53ea79c8b4252955d687842e08b2150189e2916b..35e2bc2d5044021d2ec5ab892a338d3382a65810 100755 (executable)
@@ -9,7 +9,7 @@ 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
@@ -18,6 +18,8 @@ from __future__ import absolute_import, print_function
 from binascii import hexlify
 import glob, math, os, resource, struct, sys, tempfile
 
+sys.path[:0] = [os.path.dirname(os.path.realpath(__file__)) + '/..']
+
 from bup import compat, options, git, midx, _helpers, xstat
 from bup.compat import argv_bytes, hexstr, range
 from bup.helpers import (Sha1, add_error, atomically_replaced_file, debug1, fdatasync,