[V3 Core] Fix backup error (#1820)

This commit is contained in:
Tobotimus 2018-06-09 11:12:16 +10:00 committed by Will
parent 49b80e9fe3
commit d0a53ed2df

View File

@ -1113,10 +1113,8 @@ class Core(CoreLogic):
if downloader_cog and hasattr(downloader_cog, "_repo_manager"):
repo_output = []
repo_mgr = downloader_cog._repo_manager
for n, repo in repo_mgr._repos:
repo_output.append(
{{"url": repo.url, "name": repo.name, "branch": repo.branch}}
)
for repo in repo_mgr._repos.values():
repo_output.append({"url": repo.url, "name": repo.name, "branch": repo.branch})
repo_filename = data_dir / "cogs" / "RepoManager" / "repos.json"
with open(str(repo_filename), "w") as f:
f.write(json.dumps(repo_output, indent=4))