mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-24 16:55:36 +00:00
Merge pull request #4142 from step21/master
Explicitly convert environment variable to str to address #4136
This commit is contained in:
commit
44d41e3fa6
2 changed files with 3 additions and 3 deletions
|
@ -30,8 +30,8 @@
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def clean_env(tmpdir_factory, monkeypatch):
|
def clean_env(tmpdir_factory, monkeypatch):
|
||||||
# avoid that we access / modify the user's normal .config / .cache directory:
|
# avoid that we access / modify the user's normal .config / .cache directory:
|
||||||
monkeypatch.setenv('XDG_CONFIG_HOME', tmpdir_factory.mktemp('xdg-config-home'))
|
monkeypatch.setenv('XDG_CONFIG_HOME', str(tmpdir_factory.mktemp('xdg-config-home')))
|
||||||
monkeypatch.setenv('XDG_CACHE_HOME', tmpdir_factory.mktemp('xdg-cache-home'))
|
monkeypatch.setenv('XDG_CACHE_HOME', str(tmpdir_factory.mktemp('xdg-cache-home')))
|
||||||
# also avoid to use anything from the outside environment:
|
# also avoid to use anything from the outside environment:
|
||||||
keys = [key for key in os.environ if key.startswith('BORG_')]
|
keys = [key for key in os.environ if key.startswith('BORG_')]
|
||||||
for key in keys:
|
for key in keys:
|
||||||
|
|
|
@ -68,7 +68,7 @@ class MockArgs:
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def keys_dir(self, request, monkeypatch, tmpdir):
|
def keys_dir(self, request, monkeypatch, tmpdir):
|
||||||
monkeypatch.setenv('BORG_KEYS_DIR', tmpdir)
|
monkeypatch.setenv('BORG_KEYS_DIR', str(tmpdir))
|
||||||
return tmpdir
|
return tmpdir
|
||||||
|
|
||||||
@pytest.fixture(params=(
|
@pytest.fixture(params=(
|
||||||
|
|
Loading…
Reference in a new issue