mirror of
https://github.com/ankitects/anki.git
synced 2025-11-07 13:17:12 -05:00
don't try to decode str
This commit is contained in:
parent
5c008a328e
commit
2d6173a631
1 changed files with 1 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ class View:
|
|||
f = open(self.template_file, 'r')
|
||||
try:
|
||||
template = f.read()
|
||||
if self.template_encoding:
|
||||
if self.template_encoding and isinstance(template, bytes):
|
||||
template = str(template, self.template_encoding)
|
||||
finally:
|
||||
f.close()
|
||||
|
|
|
|||
Loading…
Reference in a new issue