mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -05:00
[Downloader]: RepoManager: don't load repos in __init__ (#2829)
Loading repos is already done in initialize() method. This could actually turn out badly if both of git processes would touch the same repo at the same time. This also fixes create_backup in setup.py - now it properly generates repos.json
This commit is contained in:
@@ -409,8 +409,9 @@ async def create_backup(instance):
|
||||
from redbot.cogs.downloader.repo_manager import RepoManager
|
||||
|
||||
repo_mgr = RepoManager()
|
||||
await repo_mgr.initialize()
|
||||
repo_output = []
|
||||
for _, repo in repo_mgr._repos:
|
||||
for repo in repo_mgr._repos.values():
|
||||
repo_output.append({"url": repo.url, "name": repo.name, "branch": repo.branch})
|
||||
repo_filename = pth / "cogs" / "RepoManager" / "repos.json"
|
||||
with open(str(repo_filename), "w") as f:
|
||||
|
||||
Reference in New Issue
Block a user