From: Martin Panter Date: Thu, 13 Feb 2014 11:18:36 +0000 (+0000) Subject: Implement Section.__hash__() to avoid Python 2’s DeprecationWarning X-Git-Tag: v0.23~12^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff4f7273925df677b67b31e2b532768a392e18f8;p=pyelftools.git Implement Section.__hash__() to avoid Python 2’s DeprecationWarning --- diff --git a/elftools/elf/sections.py b/elftools/elf/sections.py index ce62450..5b200ed 100644 --- a/elftools/elf/sections.py +++ b/elftools/elf/sections.py @@ -41,6 +41,8 @@ class Section(object): def __eq__(self, other): return self.header == other.header + def __hash__(self): + return hash(self.header) class NullSection(Section):