Sort scrapers only when listing them.

This commit is contained in:
Bastian Kleineidam 2013-02-18 20:01:50 +01:00
parent dc9334cca9
commit c4191158ec
2 changed files with 1 additions and 2 deletions

2
dosage
View file

@ -161,7 +161,7 @@ def doList(columnList):
"""List available comics."""
out.info('Available comic scrapers:')
out.info('Comics marked with [A] require age confirmation with the --adult option.')
scrapers = getScrapers(['@@'])
scrapers = sorted(getScrapers(['@@']), key=lambda s: s.get_name())
try:
if columnList:
num = doColumnList(scrapers)

View file

@ -224,7 +224,6 @@ def get_scraperclasses():
modules = loader.get_modules()
plugins = loader.get_plugins(modules, _BasicScraper)
_scraperclasses = list(plugins)
_scraperclasses.sort(key=lambda s: s.get_name())
check_scrapers()
out.debug("... %d modules loaded." % len(_scraperclasses))
return _scraperclasses