Initial support for Python 3.5+ // Resolve #895 Resolve #1365

This commit is contained in:
Ivan Kravets
2018-12-26 20:54:29 +02:00
parent fabaadec60
commit a60c57ac58
35 changed files with 265 additions and 198 deletions

View File

@@ -116,9 +116,10 @@ class ProjectGenerator(object):
os.makedirs(dst_dir)
file_name = basename(tpl_path)[:-4]
contents = self._render_tpl(tpl_path)
self._merge_contents(
join(dst_dir, file_name),
self._render_tpl(tpl_path).encode("utf8"))
contents.encode("utf8") if util.PY2 else contents)
def _render_tpl(self, tpl_path):
content = ""