Skip to content

Commit

Permalink
Fix errors resulting from UTF-8 characters in manifest files
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it authored and pyhalov committed Mar 7, 2020
1 parent f006b53 commit 72fa78d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ def set_content(self, content=None, excludes=EmptyI, pathname=None,
# together has to be solved somewhere else, though.)
if pathname:
try:
with open(pathname, "r") as mfile:
with open(pathname, "r", encoding='UTF-8') as mfile:
content = mfile.read()
except EnvironmentError as e:
raise apx._convert_error(e)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/search_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def consistent_open(data_list, directory, timeout = 1):
# in the function is greater than timeout.
try:
f = os.path.join(directory, d.get_file_name())
fh = open(f, 'r')
fh = open(f, 'r', encoding='UTF-8')
# If we get here, then the current index file
# is present.
if missing == None:
Expand Down

0 comments on commit 72fa78d

Please sign in to comment.