From cc9a15e116de7bdc880566353df8eb81d3512ac8 Mon Sep 17 00:00:00 2001 From: John Schember Date: Thu, 21 Apr 2011 21:42:29 -0400 Subject: [PATCH] Store: use attrgetter --- src/calibre/gui2/store/search.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/search.py b/src/calibre/gui2/store/search.py index bba6756974..696fa35ccd 100644 --- a/src/calibre/gui2/store/search.py +++ b/src/calibre/gui2/store/search.py @@ -671,9 +671,9 @@ class SearchFilter(SearchQueryParser): locations = all_locs if location == 'all' else [location] q = { 'author': lambda x: x.author.lower(), - 'cover': lambda x: x.cover_url, - 'drm': lambda x: x.drm, - 'format': lambda x: x.formats, + 'cover': attrgetter('cover_url'), + 'drm': attrgetter('drm'), + 'format': attrgetter('formats'), 'price': lambda x: comparable_price(x.price), 'store': lambda x: x.store_name.lower(), 'title': lambda x: x.title.lower(),