File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -202,8 +202,8 @@ def build_id(self, binary):
202
202
raise Exception (f"JSON returned by llvm-readelf for binary { binary } is not a list with a single entry" )
203
203
204
204
try :
205
- note_sections = getattr ( elf_output [0 ], "NoteSections" )
206
- except AttributeError as e :
205
+ note_sections = elf_output [0 ][ "NoteSections" ]
206
+ except KeyError as e :
207
207
e .add_note (f'Failed to read "NoteSections" from llvm-readelf for binary { binary } ' )
208
208
raise
209
209
@@ -212,7 +212,7 @@ def build_id(self, binary):
212
212
note_section = entry ["NoteSection" ]
213
213
if note_section ["Name" ] == ".note.gnu.build-id" :
214
214
return note_section ["Note" ]["Build ID" ]
215
- except AttributeError as e :
215
+ except KeyError as e :
216
216
e .add_note (f'Failed to read ".note.gnu.build-id" from NoteSections entry in llvm-readelf for binary { binary } ' )
217
217
raise
218
218
raise Exception (f"Build ID not found for binary { binary } " )
You can’t perform that action at this time.
0 commit comments