mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 22:24:01 +00:00
refactoring
This commit is contained in:
@@ -87,11 +87,8 @@ class Templategen:
|
|||||||
content = template.render()
|
content = template.render()
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
data = self._read_bad_encoded_text(src)
|
data = self._read_bad_encoded_text(src)
|
||||||
template = self.env.from_string(data)
|
content = self.generate_string(data)
|
||||||
content = template.render()
|
return content.encode('utf-8')
|
||||||
|
|
||||||
content = content.encode('UTF-8')
|
|
||||||
return content
|
|
||||||
|
|
||||||
def _handle_bin_file(self, src):
|
def _handle_bin_file(self, src):
|
||||||
"""write binary to file"""
|
"""write binary to file"""
|
||||||
|
|||||||
Reference in New Issue
Block a user