From 8d71985562ef710e916ed22d265c238e1121a994 Mon Sep 17 00:00:00 2001 From: Sam Washko Date: Thu, 8 Feb 2024 15:41:42 -0800 Subject: [PATCH] [] vs None handling --- modelscan/scanners/h5/scan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modelscan/scanners/h5/scan.py b/modelscan/scanners/h5/scan.py index a5f976c..2edf752 100644 --- a/modelscan/scanners/h5/scan.py +++ b/modelscan/scanners/h5/scan.py @@ -50,7 +50,7 @@ def scan( def _scan_keras_h5_file(self, source: Union[str, Path]) -> Optional[ScanResults]: machine_learning_library_name = "Keras" operators_in_model = self._get_keras_h5_operator_names(source) - if not operators_in_model: + if operators_in_model is None: return None return H5LambdaDetectScan._check_for_unsafe_tf_keras_operator( module_name=machine_learning_library_name,