Skip to content

Commit 74aeaec

Browse files
author
walkr
committed
Print filename and err msg when a move error occurs
1 parent 4a39338 commit 74aeaec

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
@@ -38,7 +38,10 @@ def classify(formats, output):
3838
folder = os.path.join(output, folder)
3939

4040
if file_ext in ext_list:
41-
moveto(file, directory, folder)
41+
try:
42+
moveto(file, directory, folder)
43+
except Exception as e:
44+
print('Cannot move file - {} - {}'.format(file, str(e)))
4245

4346
print("Done!")
4447

0 commit comments

Comments
 (0)