Merge "Fix exception when path not found." am: 39e706e507

Original change: https://android-review.googlesource.com/c/platform/development/+/1960330

Change-Id: I17048ce8703293c07d9110db1e935b0d19594531
This commit is contained in:
Christopher Ferris
2022-01-26 18:14:33 +00:00
committed by Automerger Merge Worker

View File

@@ -332,7 +332,7 @@ class TraceConverter:
# Search for a library with the given basename and build_id anywhere in the symbols directory.
@functools.lru_cache(maxsize=None)
def GetLibraryByBuildId(self, symbols_dir, basename, build_id):
for candidate in self.GlobSymbolsDir(symbols_dir).get(basename):
for candidate in self.GlobSymbolsDir(symbols_dir).get(basename, []):
info = self.GetLibraryInfo(candidate)
if info and info.build_id == build_id:
return "/" + str(candidate.relative_to(symbols_dir))