1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 23:14:47 +00:00

refactoring

This commit is contained in:
deadc0de6
2019-02-07 15:59:05 +01:00
parent 0f987599fa
commit 48df932ae4

View File

@@ -87,11 +87,8 @@ class Templategen:
content = template.render()
except UnicodeDecodeError:
data = self._read_bad_encoded_text(src)
template = self.env.from_string(data)
content = template.render()
content = content.encode('UTF-8')
return content
content = self.generate_string(data)
return content.encode('utf-8')
def _handle_bin_file(self, src):
"""write binary to file"""