mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3: textwrap.dedent requires unicode strings, encode after the fact
Also all the format arguments are unicode strings, *and* in the wisdom of python3, you can % format a bytestring but not .format() it.
This commit is contained in:
parent
aa8efc504d
commit
dc96af5763
@ -223,13 +223,13 @@ class DOCX(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def containerrels(self):
|
def containerrels(self):
|
||||||
return textwrap.dedent(b'''\
|
return textwrap.dedent('''\
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
||||||
<Relationship Id="rId3" Type="{APPPROPS}" Target="docProps/app.xml"/>
|
<Relationship Id="rId3" Type="{APPPROPS}" Target="docProps/app.xml"/>
|
||||||
<Relationship Id="rId2" Type="{DOCPROPS}" Target="docProps/core.xml"/>
|
<Relationship Id="rId2" Type="{DOCPROPS}" Target="docProps/core.xml"/>
|
||||||
<Relationship Id="rId1" Type="{DOCUMENT}" Target="word/document.xml"/>
|
<Relationship Id="rId1" Type="{DOCUMENT}" Target="word/document.xml"/>
|
||||||
</Relationships>'''.format(**self.namespace.names))
|
</Relationships>'''.format(**self.namespace.names)).encode('utf-8')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def websettings(self):
|
def websettings(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user