Merge pull request #28209 from domschl:ldconfig-fix

PiperOrigin-RevId: 249072380
This commit is contained in:
TensorFlower Gardener 2019-05-20 10:19:59 -07:00
commit bc687c1049

View File

@ -141,7 +141,10 @@ def _get_ld_config_paths():
pattern = re.compile(".* => (.*)")
result = set()
for line in output.splitlines():
match = pattern.match(line.decode("ascii"))
try:
match = pattern.match(line.decode("ascii"))
except UnicodeDecodeError:
match = False
if match:
result.add(os.path.dirname(match.group(1)))
return sorted(list(result))