mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-09 00:32:37 -04:00
Merge pull request #1843 from enkore/issue/1801
Fix tox/pybuild in 1.0-maint
This commit is contained in:
commit
3789c78f60
1 changed files with 2 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
|
@ -10,12 +11,10 @@ import pytest
|
|||
# The workaround is to remove entries pointing there from the path and check whether "borg"
|
||||
# is still importable. If it is not, then it has not been installed in the environment
|
||||
# and the entries are put back.
|
||||
#
|
||||
# TODO: After moving the package to src/: remove this.
|
||||
|
||||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue