From c4191158ec47a31f9a3d67b72f3b0ef6e4b2661e Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Mon, 18 Feb 2013 20:01:50 +0100 Subject: [PATCH] Sort scrapers only when listing them. --- dosage | 2 +- dosagelib/scraper.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dosage b/dosage index 67e3c7fdf..e9c6a7763 100755 --- a/dosage +++ b/dosage @@ -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) diff --git a/dosagelib/scraper.py b/dosagelib/scraper.py index e42b885d3..647816b3e 100644 --- a/dosagelib/scraper.py +++ b/dosagelib/scraper.py @@ -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