From d4c9f655a872ffed49a7fd14cf7f73ec1ee83013 Mon Sep 17 00:00:00 2001 From: damianos Date: Wed, 20 Feb 2019 15:39:20 +0000 Subject: [PATCH] Fixed assert that always evaluates to True Fixes an assert statement in `/src/classifier.py` that always evaluates to True because it asserts on a non-empty tuple Disclaimer: I work for Semmle and I've found these errors using our LGTM code analyzer https://lgtm.com/projects/g/davidsandberg/facenet/alerts/?mode=tree&ruleFocus=7870115 --- src/classifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classifier.py b/src/classifier.py index 749db4d6b..2adba82db 100644 --- a/src/classifier.py +++ b/src/classifier.py @@ -56,7 +56,7 @@ def main(args): # Check that there are at least one training image per class for cls in dataset: - assert(len(cls.image_paths)>0, 'There must be at least one image for each class in the dataset') + assert len(cls.image_paths)>0, 'There must be at least one image for each class in the dataset' paths, labels = facenet.get_image_paths_and_labels(dataset)