We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f10095d commit 7b07595Copy full SHA for 7b07595
tools/strip_binaries.py
@@ -41,6 +41,11 @@ def read_elf_type(filepath):
41
for note in sect.iter_notes():
42
if note['n_type'] == 'NT_GNU_BUILD_ID':
43
buildId = note['n_desc']
44
+ # Sometimes, ELFtools return a bytes array instead of a string.
45
+ # This fixes it.
46
+ # https://github.com/eliben/pyelftools/issues/188
47
+ if isinstance(buildId, bytes):
48
+ buildId = buildId.hex()
49
break
50
except:
51
return None, None
0 commit comments