diff --git a/changelog.d/3114.bugfix.rst b/changelog.d/3114.bugfix.rst new file mode 100644 index 000000000..d1e6e1ffc --- /dev/null +++ b/changelog.d/3114.bugfix.rst @@ -0,0 +1 @@ +Fix generation of `repos.json` file in backup process. \ No newline at end of file diff --git a/redbot/core/utils/__init__.py b/redbot/core/utils/__init__.py index 9fcf37bcc..cb21c4355 100644 --- a/redbot/core/utils/__init__.py +++ b/redbot/core/utils/__init__.py @@ -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: