Merge setdefault & append lines into one line.
This commit is contained in:
parent
4c497096fc
commit
ec50b45184
1 changed files with 1 additions and 2 deletions
|
@ -34,8 +34,7 @@ def main(argv):
|
||||||
inodes.add(file.stat.st_ino)
|
inodes.add(file.stat.st_ino)
|
||||||
h = hash_file(file)
|
h = hash_file(file)
|
||||||
print(file.absolute_path, h)
|
print(file.absolute_path, h)
|
||||||
hashes.setdefault(h, [])
|
hashes.setdefault(h, []).append(file)
|
||||||
hashes[h].append(file)
|
|
||||||
|
|
||||||
hashes = {h: files for (h, files) in hashes.items() if len(files) > 1}
|
hashes = {h: files for (h, files) in hashes.items() if len(files) > 1}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue