[Downloader] Findcog fix with no repo installed (#2304)

The findcog command errored out if a repo was removed. This change informs the user that the repo is not installed instead of erroring out.
This commit is contained in:
aikaterna 2018-11-23 15:39:54 -08:00 committed by Toby Harradine
parent d17c2430d7
commit 419008f644

View File

@ -502,7 +502,7 @@ class Downloader(commands.Cog):
if isinstance(cog_installable, Installable): if isinstance(cog_installable, Installable):
made_by = ", ".join(cog_installable.author) or _("Missing from info.json") made_by = ", ".join(cog_installable.author) or _("Missing from info.json")
repo = self._repo_manager.get_repo(cog_installable.repo_name) repo = self._repo_manager.get_repo(cog_installable.repo_name)
repo_url = repo.url repo_url = _("Missing from installed repos") if repo is None else repo.url
cog_name = cog_installable.name cog_name = cog_installable.name
else: else:
made_by = "26 & co." made_by = "26 & co."