Skip to content

Commit

Permalink
Added case statement for no duplicates found
Browse files Browse the repository at this point in the history
  • Loading branch information
j605 committed Jun 11, 2012
1 parent d8b7783 commit 0d8313e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions list_duplicate_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def confirm(arg, directory, files):
y = collections.Counter(md5_list)
md5_duplicates = [i for i in y if y[i] > 1]

print 'Duplicates are: '
for item in md5_duplicates:
print parsed_hash[item]
if len(md5_duplicates) == 0:
print "No duplicates found"
else:
print 'Duplicates are: '
for item in md5_duplicates:
print parsed_hash[item]

0 comments on commit 0d8313e

Please sign in to comment.