Write repo.json to current working directory

This commit is contained in:
gandalf3
2017-06-30 15:08:07 -07:00
parent 89ca306299
commit 354523f26b
2 changed files with 5 additions and 2 deletions

View File

@@ -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:

View File

@@ -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: