From 60538ca9130aa47c8737ac4d58ee31814554ee93 Mon Sep 17 00:00:00 2001 From: Felipe Date: Thu, 14 Dec 2017 15:01:10 -0200 Subject: [PATCH] adicionado string.strip ao render_xml --- pytrustnfe/xml/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pytrustnfe/xml/__init__.py b/pytrustnfe/xml/__init__.py index 360c919..1f721e2 100644 --- a/pytrustnfe/xml/__init__.py +++ b/pytrustnfe/xml/__init__.py @@ -17,6 +17,10 @@ def recursively_empty(e): def render_xml(path, template_name, remove_empty, **nfe): + for item in nfe: + if type(nfe[item]) is str: + nfe[item] = nfe[item].strip() + env = Environment( loader=FileSystemLoader(path), extensions=['jinja2.ext.with_'])