enforce utf8 on more file reads

This commit is contained in:
Nick Sweeting 2021-04-10 07:22:32 -04:00
parent 193df5c8d3
commit 6a6ef63775
2 changed files with 2 additions and 2 deletions

View file

@ -201,7 +201,7 @@ class Snapshot(models.Model):
@cached_property
def headers(self) -> Optional[dict]:
try:
return json.loads((Path(self.link_dir) / 'headers.json').read_text().strip())
return json.loads((Path(self.link_dir) / 'headers.json').read_text(encoding='utf-8').strip())
except Exception:
pass
return None