Skip to content

Commit 3d80bbc

Browse files
committed
Code cleanup
Thanks @Tydaddy
1 parent 6a769c8 commit 3d80bbc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

phodupe/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ def main():
1313
print('No dupe files found!')
1414
exit()
1515

16-
user_input = input(str(len(dupe_files)) + ' duplicate file names found. Enter \'y\' to delete or \'n\' to abort:\n')
17-
16+
user_input = input("{} duplicate file names found. Enter 'y' to delete or 'n' to abort:\n".format(len(dupe_files)))
17+
1818
if user_input == 'y':
1919
DupeFinder.deleteFiles(dupe_files, destination1, destination2)
2020
print('Files deleted, exiting...')

phodupe/dupe_finder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ def deleteFiles(fileNames, directory1, directory2):
5050
Path of the second directory
5151
"""
5252
for file in fileNames:
53-
os.remove(directory1 + '\\' + file)
54-
os.remove(directory2 + '\\' + file)
53+
os.remove(os.path.join(directory1, file))
54+
os.remove(os.path.join(directory2, file))

0 commit comments

Comments
 (0)