From 93cfaa69a852d3a422a61e3c6454b8dbe69bcf1a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 15 Mar 2015 08:09:49 +0530 Subject: [PATCH] Conversion: Fix a regression in 2.21 that caused conversion to fail for books with invalid pseudo-class CSS selectors. Fixes #1432267 [Private bug](https://bugs.launchpad.net/calibre/+bug/1432267) --- src/calibre/ebooks/oeb/stylizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index fc9c1e63ec..d50062d7b6 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -180,9 +180,9 @@ class Stylizer(object): for _, _, cssdict, text, _ in rules: fl = pseudo_pat.search(text) try: - matches = select(text) + matches = tuple(select(text)) except SelectorError as err: - self.log.error('Ignoring CSS rule with invalid selector: %r (%s)' % (text, as_unicode(err))) + self.logger.error('Ignoring CSS rule with invalid selector: %r (%s)' % (text, as_unicode(err))) continue if fl is not None: