added rethash parameter to iter_file_dups

This commit is contained in:
Darko Poljak 2014-01-28 07:30:26 +01:00
parent a60ede31fb
commit 4b8a7d51be

View file

@ -109,9 +109,9 @@ def iter_file_dups(topdirs=['./'], rethash=False, hashalg='md5', block_size=4096
returned, otherwise duplicate paths list is returned. returned, otherwise duplicate paths list is returned.
""" """
dups = file_dups(topdirs, hashalg, block_size) dups = file_dups(topdirs, hashalg, block_size)
for hash, fpaths in _dict_iter_items: for hash_, fpaths in _dict_iter_items(dups):
if rethash: if rethash:
yield (hash, fpaths) yield (hash_, fpaths)
else: else:
yield fpaths yield fpaths