mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-30 18:45:20 -04:00
Remove redundant declaration of OPF namespace
This commit is contained in:
@@ -693,7 +693,9 @@ class Metadata(object):
|
||||
def to_opf2(self, parent=None):
|
||||
nsmap = self._opf2_nsmap
|
||||
nsrmap = dict((value, key) for key, value in nsmap.items())
|
||||
elem = element(parent, OPF('metadata'), nsmap=nsmap)
|
||||
nmap = dict(**nsmap)
|
||||
nmap.pop('opf', '')
|
||||
elem = element(parent, OPF('metadata'), nsmap=nmap)
|
||||
for term in self.items:
|
||||
for item in self.items[term]:
|
||||
item.to_opf2(elem, nsrmap=nsrmap)
|
||||
|
||||
Reference in New Issue
Block a user