Skip to content

Commit 3123644

Browse files
committed
Merge pull request #50 from walkr/master
Print filename and err msg when a move error occurs
2 parents a4a757c + 74aeaec commit 3123644

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

classifier/classifier.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ def classify(formats, output):
4141
folder = os.path.join(output, folder)
4242

4343
if file_ext in ext_list:
44-
moveto(file, directory, folder)
44+
try:
45+
moveto(file, directory, folder)
46+
except Exception as e:
47+
print('Cannot move file - {} - {}'.format(file, str(e)))
4548

4649
print("Done!")
4750

0 commit comments

Comments
 (0)