mirror of
https://github.com/lutris/lutris
synced 2024-07-01 06:34:26 +00:00
Tolerate non-UTF8 data found in another processes enviroment.
We don't actually care about this data, we only look for our own environment variable and the command line, and we are looking for ASCII stuff we put there anyway, so these replacements are harmless. Resolves #5518
This commit is contained in:
parent
fea3c44561
commit
350305cf86
|
@ -29,7 +29,7 @@ class Process:
|
|||
def _read_content(self, file_path):
|
||||
"""Return the contents from a file in /proc"""
|
||||
try:
|
||||
with open(file_path, encoding="utf-8") as proc_file:
|
||||
with open(file_path, encoding="utf-8", errors="replace") as proc_file:
|
||||
content = proc_file.read()
|
||||
except PermissionError:
|
||||
return ""
|
||||
|
|
Loading…
Reference in New Issue
Block a user