Skip to content

Commit 905c293

Browse files
committed
Ignore known files with no faces in CLI
1 parent 017a77b commit 905c293

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

face_recognition/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def scan_known_people(known_people_folder):
2222

2323
if len(encodings) == 0:
2424
click.echo("WARNING: No faces found in {}. Ignoring file.".format(file))
25-
26-
known_names.append(basename)
27-
known_face_encodings.append(encodings[0])
25+
else:
26+
known_names.append(basename)
27+
known_face_encodings.append(encodings[0])
2828

2929
return known_names, known_face_encodings
3030

0 commit comments

Comments
 (0)