[kernel-team] 79/86: kconfigeditor/kconfig/config.py, show-enabled.py: Python 3 support.
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon Dec 21 00:35:01 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 f08b3d7507cd186ac28a8725273cc235e77975ab
Author: Bastian Blank <waldi at debian.org>
Date: Sat Sep 14 09:20:04 2013 +0000
kconfigeditor/kconfig/config.py, show-enabled.py: Python 3 support.
svn path=/people/waldi/utils/kconfigeditor2/; revision=20626
---
utils/kconfigeditor2/kconfigeditor/kconfig/config.py | 3 +++
utils/kconfigeditor2/show-enabled.py | 12 ++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/utils/kconfigeditor2/kconfigeditor/kconfig/config.py b/utils/kconfigeditor2/kconfigeditor/kconfig/config.py
index 132bcdd..b692bc3 100644
--- a/utils/kconfigeditor2/kconfigeditor/kconfig/config.py
+++ b/utils/kconfigeditor2/kconfigeditor/kconfig/config.py
@@ -136,6 +136,9 @@ class FileEntry(object):
return ret
return cmp(self.value, other.value)
+ def __eq__(self, other):
+ return self.name == other.name and self.value == other.value
+
def __hash__(self):
return hash(self.name) | hash(self.value)
diff --git a/utils/kconfigeditor2/show-enabled.py b/utils/kconfigeditor2/show-enabled.py
index 0bb239e..08e3759 100755
--- a/utils/kconfigeditor2/show-enabled.py
+++ b/utils/kconfigeditor2/show-enabled.py
@@ -25,7 +25,7 @@ class Main(object):
options = {}
for filename, data in package.items():
- for name, value in data.file.iteritems():
+ for name, value in data.file.items():
option = options.setdefault(name, Option(name))
option.add(value, filename)
@@ -34,13 +34,13 @@ class Main(object):
return ''
return filename
- for name, option in sorted(options.iteritems()):
+ for name, option in sorted(options.items()):
if len(option.values) > 1:
- for value, filenames in option.values.iteritems():
- print value
+ for value, filenames in option.values.items():
+ print(value)
filenames.sort()
- print 'in', ' '.join(sorted(filenames, key=filenames_sortkey))
- print
+ print('in', ' '.join(sorted(filenames, key=filenames_sortkey)))
+ print()
if __name__ == '__main__':
--
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