Make sure ELFFile.has_dwarf_info() returns a boolean. (#266)
authorFish <ltfish@users.noreply.github.com>
Tue, 4 Feb 2020 13:32:30 +0000 (06:32 -0700)
committerGitHub <noreply@github.com>
Tue, 4 Feb 2020 13:32:30 +0000 (05:32 -0800)
elftools/elf/elffile.py

index 537a647f8e2556e747d26e6f77ba29000c60a153..6bafa27639886f933191244b120fd5ef4be5c630 100644 (file)
@@ -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'))