mirror of
https://github.com/lutris/lutris
synced 2024-09-05 23:46:21 +00:00
Catch OSError when restoring library environment (Closes #1130)
This commit is contained in:
parent
fec9fbf750
commit
8a0438e22f
|
@ -326,7 +326,10 @@ def reset_library_preloads():
|
|||
"""Remove library preloads from environment"""
|
||||
for key in ("LD_LIBRARY_PATH", "LD_PRELOAD"):
|
||||
if os.environ.get(key):
|
||||
del os.environ[key]
|
||||
try:
|
||||
del os.environ[key]
|
||||
except OSError:
|
||||
logger.error("Failed to delete environment variable %s", key)
|
||||
|
||||
|
||||
def run_once(function):
|
||||
|
|
Loading…
Reference in a new issue