From ce639c48f6cb06164e85e80c66c96fd091cab55f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Jun 2011 11:00:31 -0600 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/stylizer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index 5ade915e4f..67b92b5b5a 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -548,6 +548,7 @@ class Style(object): profiles=[cssutils.profiles.Profiles.CSS_LEVEL_2])[1] if self._bgcolor is None: + col = None val = self._style.get('background-color', None) if val and validate_color(val): col = val @@ -569,8 +570,11 @@ class Style(object): break except: pass - self._bgcolor = col - return self._bgcolor + if col is None: + self._bgcolor = False + else: + self._bgcolor = col + return self._bgcolor if self._bgcolor else None @property def fontSize(self):