mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[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:
1
changelog.d/3114.bugfix.rst
Normal file
1
changelog.d/3114.bugfix.rst
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix generation of `repos.json` file in backup process.
|
||||||
@@ -428,7 +428,7 @@ async def create_backup(dest: Path = Path.home()) -> Optional[Path]:
|
|||||||
repo_mgr = RepoManager()
|
repo_mgr = RepoManager()
|
||||||
await repo_mgr.initialize()
|
await repo_mgr.initialize()
|
||||||
repo_output = []
|
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})
|
repo_output.append({"url": repo.url, "name": repo.name, "branch": repo.branch})
|
||||||
repos_file = data_path / "cogs" / "RepoManager" / "repos.json"
|
repos_file = data_path / "cogs" / "RepoManager" / "repos.json"
|
||||||
with repos_file.open("w") as fs:
|
with repos_file.open("w") as fs:
|
||||||
|
|||||||
Reference in New Issue
Block a user