Merge pull request #2366 from DarkWingMcQuack/patch-1

fix UnicodeDecodeError on startup
This commit is contained in:
Mathieu Comandon 2019-10-16 06:27:59 -07:00 committed by GitHub
commit 542a69527a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,7 +303,7 @@ class LinuxSystem:
logger.error("Could not detect ldconfig on this system") logger.error("Could not detect ldconfig on this system")
return [] return []
try: 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: except subprocess.CalledProcessError as ex:
logger.error("Failed to get libraries from ldconfig: %s", ex) logger.error("Failed to get libraries from ldconfig: %s", ex)
return [] return []