Merge pull request #5149 from achillesrasquinha/py3

[FIX] safe decode text type
This commit is contained in:
Achilles Rasquinha 2018-03-08 17:39:20 +05:30 committed by GitHub
commit cef75a8bfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,7 @@ class Page(Document):
fpath = os.path.join(path, page_name + '.css')
if os.path.exists(fpath):
with open(fpath, 'r') as f:
self.style = text_type(f.read(), "utf-8")
self.style = safe_decode((f.read())
# html as js template
for fname in os.listdir(path):