Skip to content

Commit

Permalink
packages: explicit encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
yagebu committed Sep 19, 2021
1 parent b26b092 commit 82ccb3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lektor/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def publish_package(path):
def load_manifest(filename):
rv = {}
try:
with open(filename) as f:
with open(filename, encoding="utf-8") as f:
for line in f:
if line[:1] == "@" and "=" not in line:
rv[line.strip()] = None
Expand All @@ -159,7 +159,7 @@ def load_manifest(filename):


def write_manifest(filename, packages):
with open(filename, "w") as f:
with open(filename, "w", encoding="utf-8") as f:
for package, version in sorted(packages.items()):
if version is None:
f.write(f"{package}\n")
Expand Down

0 comments on commit 82ccb3b

Please sign in to comment.