commit
053bbdfdef
@ -98,8 +98,12 @@ class DocxTemplate(object):
|
||||
|
||||
def build_headers_footers_xml(self,context, uri,jinja_env=None):
|
||||
for relKey, xml in self.get_headers_footers_xml(uri):
|
||||
if six.PY3:
|
||||
xml = xml.decode('utf-8')
|
||||
encoding = self.get_headers_footers_encoding(xml)
|
||||
xml = self.patch_xml(xml).decode(encoding)
|
||||
xml = self.patch_xml(xml)
|
||||
if not six.PY3:
|
||||
xml = xml.decode(encoding)
|
||||
xml = self.render_xml(xml, context, jinja_env)
|
||||
yield relKey, xml.encode(encoding)
|
||||
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
import subprocess
|
||||
import glob
|
||||
import six
|
||||
|
||||
tests = glob.glob('[A-Za-z]*.py')
|
||||
excludes = ['runtests.py']
|
||||
|
||||
for test in tests:
|
||||
if test not in excludes:
|
||||
print '%s ...' % test
|
||||
six.print_('%s ...' % test)
|
||||
subprocess.call(['python','./%s' % test])
|
||||
|
||||
print 'Done.'
|
||||
six.print_('Done.')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user