fix(backup): fixed the final logging step

This commit is contained in:
Seaswimmer 2024-01-31 14:48:07 -05:00
parent f33ebd29e9
commit 9b930fc05b
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -187,14 +187,14 @@ class Backup(commands.Cog):
if repository.available_libraries: if repository.available_libraries:
installed_libs, failed_libs = await repository.install_libraries(target_dir=downloader.SHAREDLIB_PATH, req_target_dir=downloader.LIB_PATH) installed_libs, failed_libs = await repository.install_libraries(target_dir=downloader.SHAREDLIB_PATH, req_target_dir=downloader.LIB_PATH)
else: else:
installed_libs = ((),) installed_libs = None
failed_libs = () failed_libs = None
if cog_pinned: if cog_pinned:
for cog in installed_cogs: for cog in installed_cogs:
cog.pinned = True cog.pinned = True
await downloader._save_to_installed(installed_cogs + installed_libs) await downloader._save_to_installed(installed_cogs + installed_libs if installed_libs else installed_cogs)
if failed_cogs: if failed_cogs:
install_e.append(f"Failed to install {failed_cogs}") install_e.append(f"Failed to install {failed_cogs}")
if failed_libs: if failed_libs: