Merge pull request #258 from awesomo4000/fix-lxml-parse
Prevent lxml from attempting to parse None
This commit is contained in:
commit
dd588034e9
@ -236,7 +236,7 @@ class DocxTemplate(object):
|
||||
|
||||
def get_headers_footers_xml(self, uri):
|
||||
for relKey, val in self.docx._part._rels.items():
|
||||
if val.reltype == uri:
|
||||
if (val.reltype == uri) and (val._target._blob):
|
||||
yield relKey, self.xml_to_string(parse_xml(val._target._blob))
|
||||
|
||||
def get_headers_footers_encoding(self,xml):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user