From 354523f26bb69aeced05a755d8b12cf205bb227a Mon Sep 17 00:00:00 2001 From: gandalf3 Date: Fri, 30 Jun 2017 15:08:07 -0700 Subject: [PATCH] Write repo.json to current working directory --- blenderpack.py | 5 ++++- tests/test_make_repo.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/blenderpack.py b/blenderpack.py index c750e05..d0f382b 100755 --- a/blenderpack.py +++ b/blenderpack.py @@ -140,7 +140,10 @@ def make_repo(repopath: pathlib.Path): repo_data['packages'] = package_data - dump_repo(repopath, repo_data) + log.info("Repository generation successful") + cwd = pathlib.Path.cwd() + dump_repo(cwd, repo_data) + log.info("repo.json written to %s" % cwd) def dump_repo(repo_path: pathlib.Path, repo_data: dict): with (repo_path / 'repo.json').open('w', encoding='utf-8') as repo_file: diff --git a/tests/test_make_repo.py b/tests/test_make_repo.py index 5fc4faf..792520f 100644 --- a/tests/test_make_repo.py +++ b/tests/test_make_repo.py @@ -29,7 +29,7 @@ class test_blenderpack_make_repo(unittest.TestCase): def test_make_repo_valid(self): blenderpack.make_repo(self.helper_path / 'addons') - repojson = self.helper_path / 'addons' / 'repo.json' + repojson = Path.cwd() / 'repo.json' try: with repojson.open('r') as f: