[Backup] Fix generation of repos.json file in backup process (#3114)

* fix: generation of `repos.json` file in backup process

* chore(changelog): add towncrier entry
This commit is contained in:
jack1142 2019-12-20 08:03:46 +01:00 committed by Michael H
parent 6bf9ff5637
commit 9d027747d1
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Fix generation of `repos.json` file in backup process.

View File

@ -428,7 +428,7 @@ async def create_backup(dest: Path = Path.home()) -> Optional[Path]:
repo_mgr = RepoManager()
await repo_mgr.initialize()
repo_output = []
for _, repo in repo_mgr._repos:
for repo in repo_mgr.repos:
repo_output.append({"url": repo.url, "name": repo.name, "branch": repo.branch})
repos_file = data_path / "cogs" / "RepoManager" / "repos.json"
with repos_file.open("w") as fs: