fix(backup): fixed some logging stuff

This commit is contained in:
Seaswimmer 2024-01-31 15:05:25 -05:00
parent 7766b94a9e
commit f57b2c5196
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -201,11 +201,15 @@ class Backup(commands.Cog):
await downloader._save_to_installed(installed_cogs + installed_libs if installed_libs else installed_cogs) # pylint: disable=protected-access
if installed_cogs:
install_s.append(f"Installed {installed_cogs}")
installed_cog_name = installed_cogs[0].name
install_s.append(f"Installed {installed_cog_name}")
if installed_libs:
install_s.append(f"Installed {installed_libs} required for {cog_name}")
for lib in installed_libs:
install_s.append(f"Installed {lib.name} required for {cog_name}")
if failed_cogs:
install_e.append(f"Failed to install {failed_cogs}")
failed_cog_name = failed_cogs[0].name
install_e.append(f"Failed to install {failed_cog_name}")
if failed_libs:
install_e.append(f"Failed to install {failed_libs} required for {cog_name}")
for lib in failed_libs:
install_e.append(f"Failed to install {lib.name} required for {cog_name}")
await ctx.send("Import complete!", file=text_to_file(f"Repositories:\n{repo_s}\n\nRepository Errors:\n{repo_e}\n\nUninstalled Cogs:\n{uninstall_s}\n\nUninstalled Cogs Errors:\n{uninstall_e}\n\nInstalled Cogs:\n{install_s}\n\nInstalled Cogs Errors:\n{install_e}", 'backup.log'))