From 2663085c5518d990527837c21e24078241439647 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 25 Apr 2019 03:32:21 -0400 Subject: [PATCH] py3: don't unpack dict before passing it to new defaultdict constructor This was never needed, but it breaks on python3 since e.g. None cannot be a keyword. defaultdict can just accept the dict itself, though. --- src/calibre/ebooks/oeb/transforms/split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/transforms/split.py b/src/calibre/ebooks/oeb/transforms/split.py index 65fdb91698..24a77fe0e6 100644 --- a/src/calibre/ebooks/oeb/transforms/split.py +++ b/src/calibre/ebooks/oeb/transforms/split.py @@ -76,7 +76,7 @@ class Split(object): if splitter.was_split: am = splitter.anchor_map self.map[item.href] = collections.defaultdict( - am.default_factory, **am) + am.default_factory, am) def find_page_breaks(self, item): if self.page_break_selectors is None: