fix UnicodeDecodeError on startup

This commit is contained in:
DarkWingMcQuack 2019-09-26 12:23:22 +02:00 committed by GitHub
parent ab24c7812e
commit f28772bbd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -302,7 +302,7 @@ class LinuxSystem:
logger.error("Could not detect ldconfig on this system")
return []
try:
output = subprocess.check_output([ldconfig, "-p"]).decode("utf-8").split("\n")
output = subprocess.check_output([ldconfig, "-p"]).decode("utf-8", errors="ignore").split("\n")
except subprocess.CalledProcessError as ex:
logger.error("Failed to get libraries from ldconfig: %s", ex)
return []