Skip to content

Commit ab7f0a0

Browse files
mikiczhroncok
authored andcommitted
Explicit encoding for opening files
1 parent 39ac1f0 commit ab7f0a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

naucse/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def subpage_url(page):
175175
template = self._get_template()
176176
content = template.render(**kwargs)
177177
else:
178-
with self.path.open() as file:
178+
with self.path.open(encoding="utf-8") as file:
179179
content = file.read()
180180

181181
def convert_url(url):
@@ -435,7 +435,7 @@ def get_coverpage_content(self, run, coverpage, app):
435435
q = self.path / 'sessions' / self.slug / coverpage
436436

437437
try:
438-
with q.open() as f:
438+
with q.open(encoding="utf-8") as f:
439439
md_content = f.read()
440440
except FileNotFoundError:
441441
return ""

0 commit comments

Comments
 (0)