From 76b3c38e035f0bac2cad88ba996aba555bb3c808 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 26 Jul 2013 10:47:56 +0530 Subject: [PATCH] Document the danger of using parse_css in the polish books container --- src/calibre/ebooks/oeb/polish/container.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index 63230b899b..6cd9e47b5b 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -202,6 +202,9 @@ class Container(object): return data def parse_css(self, data, fname): + ''' WARNING: This modifies the CSS tripping out @page rules, comments + etc. If you wish to write back the css, you should override the + css_preprocessor with a dummy one. ''' from cssutils import CSSParser, log log.setLevel(logging.WARN) log.raiseExceptions = False