1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 08:16:54 +00:00

fix tox build for environment-python != containing-python in yet-another instance

this instance: the repository worktree is *not* named borg.
This commit is contained in:
Marian Beermann 2016-05-24 20:57:52 +02:00
parent 5fa52758a0
commit 4f1157c3a4
No known key found for this signature in database
GPG key ID: 9B8450B91D1362C1

View file

@ -1,3 +1,4 @@
import os.path
import sys
# This is a hack to fix path problems because "borg" (the package) is in the source root.
@ -11,7 +12,7 @@
original_path = list(sys.path)
for entry in original_path:
if entry == '' or entry.endswith('/borg'):
if entry == '' or entry == os.path.dirname(__file__):
sys.path.remove(entry)
try: