[Reproducible-commits] [diffoscope] 06/21: Replace iteritems() by viewitems() in perform_fuzzy_matching
Jérémy Bobbio
lunar at moszumanska.debian.org
Mon Sep 21 17:39:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository diffoscope.
commit 1c7c38ea204b7696ed2a94ee0010e32d8f8ce5b5
Author: Jérémy Bobbio <lunar at debian.org>
Date: Fri Sep 18 16:14:06 2015 +0200
Replace iteritems() by viewitems() in perform_fuzzy_matching
This prepares the switch to Python 3, see:
https://docs.python.org/2/whatsnew/2.7.html#pep-3106-dictionary-views
---
diffoscope/comparators/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/diffoscope/comparators/__init__.py b/diffoscope/comparators/__init__.py
index 0900a37..3a6d0d6 100644
--- a/diffoscope/comparators/__init__.py
+++ b/diffoscope/comparators/__init__.py
@@ -161,11 +161,11 @@ def perform_fuzzy_matching(members1, members2):
# Perform local copies because they will be modified by consumer
members1 = dict(members1)
members2 = dict(members2)
- for name1, file1 in members1.iteritems():
+ for name1, file1 in members1.viewitems():
if file1.is_directory() or not file1.fuzzy_hash:
continue
comparisons = []
- for name2, file2 in members2.iteritems():
+ for name2, file2 in members2.viewitems():
if name2 in already_compared or file2.is_directory() or not file2.fuzzy_hash:
continue
comparisons.append((tlsh.diff(file1.fuzzy_hash, file2.fuzzy_hash), name2))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list