From 1399ba20f23caec9fa75365d69c6e6c3baa3960e Mon Sep 17 00:00:00 2001 From: Fish Date: Tue, 4 Feb 2020 06:32:30 -0700 Subject: [PATCH] Make sure ELFFile.has_dwarf_info() returns a boolean. (#266) --- elftools/elf/elffile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')) -- 2.30.2