From a301d629498e62675ee04d601456021f337df78d Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Thu, 22 Feb 2018 14:19:38 +0100 Subject: [PATCH] raise runtimeerror exception instead --- bob/pad/base/tools/algorithm.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bob/pad/base/tools/algorithm.py b/bob/pad/base/tools/algorithm.py index 85c7c72..960c479 100644 --- a/bob/pad/base/tools/algorithm.py +++ b/bob/pad/base/tools/algorithm.py @@ -114,22 +114,13 @@ def project(algorithm, extractor, groups=None, indices=None, allow_missing_files for i in index_range: feature_file = str(feature_files[i]) projected_file = str(projected_files[i]) - if not os.path.exists(feature_file): - if allow_missing_files: - logger.debug( - "... Cannot find extracted feature file %s; skipping", - feature_file) - continue - else: - logger.error("Cannot find extracted feature file %s", - feature_file) if not os.path.exists(feature_file): if allow_missing_files: logger.debug("... Cannot find extracted feature file %s; skipping", feature_file) continue else: - logger.error("Cannot find extracted feature file %s", feature_file) + raise RuntimeError("Cannot find extracted feature file %s" % feature_file) if not utils.check_file(projected_file, force, 1000): logger.debug("... Projecting features for file '%s'", feature_file) -- GitLab