From 104407b357dfbdf203f37ed1cda73c1326d39744 Mon Sep 17 00:00:00 2001
From: Manuel Gunther <siebenkopf@googlemail.com>
Date: Fri, 30 Sep 2016 10:31:18 -0600
Subject: [PATCH] Removed the superflouos original_data_list_files from the
 FileSelector and updated preprocessor accordingly

---
 bob/bio/base/test/test_scripts.py  |  1 -
 bob/bio/base/tools/FileSelector.py | 10 +++++-----
 bob/bio/base/tools/preprocessor.py |  3 ++-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/bob/bio/base/test/test_scripts.py b/bob/bio/base/test/test_scripts.py
index ec918b33..b8782234 100644
--- a/bob/bio/base/test/test_scripts.py
+++ b/bob/bio/base/test/test_scripts.py
@@ -144,7 +144,6 @@ def test_verify_parallel():
       '-e', 'bob.bio.base.test.dummy.extractor.DummyExtractor()',
       '-a', 'dummy',
       '--zt-norm',
-      '--allow-missing-files',
       '-vs', 'test_parallel',
       '--temp-directory', test_dir,
       '--result-directory', test_dir,
diff --git a/bob/bio/base/tools/FileSelector.py b/bob/bio/base/tools/FileSelector.py
index 90e3f0a4..0870ee71 100644
--- a/bob/bio/base/tools/FileSelector.py
+++ b/bob/bio/base/tools/FileSelector.py
@@ -107,12 +107,12 @@ class FileSelector(object):
 
   ### List of files that will be used for all files
   def original_data_list(self, groups = None):
-    """Returns the list of original data that can be used for preprocessing."""
-    return self.database.original_file_names(self.database.all_files(groups=groups))
+    """Returns the list of original ``BioFile`` objects that can be used for preprocessing."""
+    return self.database.all_files(groups=groups)
 
-  def original_data_list_files(self, groups = None):
-    """Returns the list of original data that can be used for preprocessing."""
-    return (self.database.all_files(groups=groups), self.database.original_directory, self.database.original_extension)
+  def original_directory_and_extension(self):
+    """Returns the directory and extension of the original files."""
+    return self.database.original_directory, self.database.original_extension
 
   def annotation_list(self, groups = None):
     """Returns the list of annotations objects."""
diff --git a/bob/bio/base/tools/preprocessor.py b/bob/bio/base/tools/preprocessor.py
index 18cd9882..7916725d 100644
--- a/bob/bio/base/tools/preprocessor.py
+++ b/bob/bio/base/tools/preprocessor.py
@@ -42,7 +42,8 @@ def preprocess(preprocessor, groups = None, indices = None, allow_missing_files
   fs = FileSelector.instance()
 
   # get the file lists
-  data_files, original_directory, original_extension = fs.original_data_list_files(groups=groups)
+  data_files = fs.original_data_list(groups=groups)
+  original_directory, original_extension = fs.original_directory_and_extension()
   preprocessed_data_files = fs.preprocessed_data_list(groups=groups)
 
   # select a subset of keys to iterate
-- 
GitLab