mirror of
https://github.com/ankitects/anki.git
synced 2025-11-07 21:27:14 -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')
|
f = open(self.template_file, 'r')
|
||||||
try:
|
try:
|
||||||
template = f.read()
|
template = f.read()
|
||||||
if self.template_encoding:
|
if self.template_encoding and isinstance(template, bytes):
|
||||||
template = str(template, self.template_encoding)
|
template = str(template, self.template_encoding)
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue