diff --git a/src/calibre/ebooks/oeb/polish/split.py b/src/calibre/ebooks/oeb/polish/split.py index 0c7effabb4..dac0c9b4d7 100644 --- a/src/calibre/ebooks/oeb/polish/split.py +++ b/src/calibre/ebooks/oeb/polish/split.py @@ -419,7 +419,7 @@ def merge_css(container, names, master): # Remove charset rules cr = [r for r in sheet.cssRules if r.type == r.CHARSET_RULE] - [sheet.remove(r) for r in cr] + [sheet.deleteRule(sheet.cssRules.index(r)) for r in cr] for rule in sheet.cssRules: msheet.add(rule)