[kernel-team] 52/86: lib/kconfigeditor/kconfig/config.py: Make file entries hashable.

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Dec 21 00:34:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch benh/kconfigeditor2
in repository kernel-team.

commit 3395902d0c7d279ef8e733acac4f596ee0d4d02b
Author: Bastian Blank <waldi at debian.org>
Date:   Thu Oct 29 10:35:46 2009 +0000

    lib/kconfigeditor/kconfig/config.py: Make file entries hashable.
    
    svn path=/people/waldi/utils/kconfigeditor2/; revision=14491
---
 utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py b/utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py
index b93a0ca..de40652 100644
--- a/utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py
+++ b/utils/kconfigeditor2/lib/kconfigeditor/kconfig/config.py
@@ -161,6 +161,12 @@ class FileEntry(object):
             return ret
         return cmp(self.value, other.value)
 
+    def __hash__(self):
+        return hash(self.name) | hash(self.value)
+
+    def __repr__(self):
+        return '<%s(%r, %r, %r)>' % (self.__class__.__name__, self.name, self.value, self.comments)
+
     def __str__(self):
         return "CONFIG_%s=%s" % (self.name, self.value)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git



More information about the Kernel-svn-changes mailing list