Skip to content

Commit d99efc8

Browse files
committed
Remove check isfile
1 parent a708351 commit d99efc8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

classifier/classifier.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ def moveto(file, from_folder, to_folder):
2222
from_file = os.path.join(from_folder, file)
2323
to_file = os.path.join(to_folder, file)
2424

25-
# to move only files, not folders
26-
if os.path.isfile(from_file):
27-
if not os.path.exists(to_folder):
28-
os.makedirs(to_folder)
29-
os.rename(from_file, to_file)
25+
if not os.path.exists(to_folder):
26+
os.makedirs(to_folder)
27+
os.rename(from_file, to_file)
3028

3129

3230
def classify(formats, output, directory):

0 commit comments

Comments
 (0)