fix(backup): doing some cleanup
This commit is contained in:
parent
4e70145d38
commit
22237a21b1
2 changed files with 9 additions and 3 deletions
|
@ -20,6 +20,6 @@ Exports a JSON list of all of your added repositories, and their installed cogs.
|
|||
|
||||
### backup import
|
||||
|
||||
- Usage: `[p]backup import [json]`
|
||||
- Usage: `[p]backup import`
|
||||
|
||||
Imports, reinstalls, and reloads cogs from a valid export. Requires the JSON export to be attached to the invoking message as an attachment. Ignores itself and PyLav cogs.
|
||||
Reinstalls repositories and cogs from a valid export. Requires the JSON export to be attached to the invoking message as an attachment. Ignores itself and PyLav cogs, due to possible conflicts with Docker images.
|
||||
|
|
|
@ -59,7 +59,9 @@ class Backup(commands.Cog):
|
|||
if cog.repo_name == repo.name:
|
||||
cog_dict = {
|
||||
"name": cog.name,
|
||||
"loaded": ctx.bot.get_cog(cog.name) is not None,
|
||||
# "loaded": cog.name in ctx.bot.extensions.keys(),
|
||||
# this functionality was planned but never implemented due to Red limitations
|
||||
# and the possibility of restoration functionality being added to Core
|
||||
"pinned": cog.pinned,
|
||||
"commit": cog.commit
|
||||
}
|
||||
|
@ -178,6 +180,10 @@ class Backup(commands.Cog):
|
|||
else:
|
||||
commit = None
|
||||
|
||||
# If you're forking this cog, make sure to change these strings!
|
||||
if cog_name == 'backup' and 'SeaswimmerTheFsh/SeaCogs' in url:
|
||||
continue
|
||||
|
||||
async with repository.checkout(commit, exit_to_rev=repository.branch):
|
||||
cogs_c, message = await downloader._filter_incorrect_cogs_by_names(repository, [cog_name]) # pylint: disable=protected-access
|
||||
if not cogs_c:
|
||||
|
|
Loading…
Reference in a new issue