[V3] Fix for issue #1363 (#1424)

[p]cogs and [p]repo now print alphabetically
This commit is contained in:
BaIthamel 2018-03-12 22:44:30 +00:00 committed by Will
parent c7e8c95640
commit 1cb74f0ea7
2 changed files with 4 additions and 0 deletions

View File

@ -248,6 +248,7 @@ class Downloader:
Lists all installed repos. Lists all installed repos.
""" """
repos = self._repo_manager.get_all_repo_names() repos = self._repo_manager.get_all_repo_names()
repos = sorted(repos, key=str.lower)
joined = _("Installed Repos:\n") + "\n".join(["+ " + r for r in repos]) joined = _("Installed Repos:\n") + "\n".join(["+ " + r for r in repos])
for page in pagify(joined, ["\n"], shorten_by=16): for page in pagify(joined, ["\n"], shorten_by=16):

View File

@ -415,6 +415,9 @@ class CogManagerUI:
unloaded = all - loaded unloaded = all - loaded
loaded = sorted(list(loaded), key=str.lower)
unloaded = sorted(list(unloaded), key=str.lower)
loaded = ('**{} loaded:**\n').format(len(loaded)) + ", ".join(loaded) loaded = ('**{} loaded:**\n').format(len(loaded)) + ", ".join(loaded)
unloaded = ('**{} unloaded:**\n').format(len(unloaded)) + ", ".join(unloaded) unloaded = ('**{} unloaded:**\n').format(len(unloaded)) + ", ".join(unloaded)