From: Fish Date: Tue, 4 Feb 2020 13:32:30 +0000 (-0700) Subject: Make sure ELFFile.has_dwarf_info() returns a boolean. (#266) X-Git-Tag: v0.27~69 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1399ba20f23caec9fa75365d69c6e6c3baa3960e;p=pyelftools.git Make sure ELFFile.has_dwarf_info() returns a boolean. (#266) --- diff --git a/elftools/elf/elffile.py b/elftools/elf/elffile.py index 537a647..6bafa27 100644 --- a/elftools/elf/elffile.py +++ b/elftools/elf/elffile.py @@ -150,7 +150,7 @@ class ELFFile(object): We assume that if it has the .debug_info or .zdebug_info section, it has all the other required sections as well. """ - return (self.get_section_by_name('.debug_info') or + return bool(self.get_section_by_name('.debug_info') or self.get_section_by_name('.zdebug_info') or self.get_section_by_name('.eh_frame'))