Changed code to be python < 3.6 compatible

This commit is contained in:
Eric Lapouyade 2021-10-01 12:29:56 +02:00
parent 5e8aeae272
commit 0238472033
3 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
0.14.0 (2021-09-30)
0.14.1 (2021-10-01)
-------------------
- One can now use python -m docxtpl on command line
to generate a docx from a template and a json file as a context

View File

@ -4,7 +4,7 @@ Created : 2015-03-12
@author: Eric Lapouyade
"""
__version__ = '0.14.0'
__version__ = '0.14.1'
# flake8: noqa
from .inline_image import InlineImage

View File

@ -118,7 +118,7 @@ def render_docx(doc, json_data):
raise RuntimeError('An error ocurred while trying to render the docx')
def save_file(doc: DocxTemplate, parsed_args: dict) -> None:
def save_file(doc, parsed_args):
try:
output_path = parsed_args[OUTPUT_ARG]
doc.save(output_path)