From ce5ac634504ffaf948d2aeee2c71da644899a630 Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Mon, 27 Nov 2017 16:39:41 +0100
Subject: [PATCH] Do not use pretty prininting with kwargs

---
 bob/bio/base/database/database.py       |  2 +-
 bob/bio/base/database/filelist/query.py | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/bob/bio/base/database/database.py b/bob/bio/base/database/database.py
index 653b97f9..63092420 100644
--- a/bob/bio/base/database/database.py
+++ b/bob/bio/base/database/database.py
@@ -101,7 +101,7 @@ class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.FileDatabase)):
         self.enroller_training_options = enroller_training_options
         self.check_existence = check_original_files_for_existence
 
-        self._kwargs = kwargs
+        self._kwargs = {}
 
         self.annotation_directory = annotation_directory
         self.annotation_extension = annotation_extension
diff --git a/bob/bio/base/database/filelist/query.py b/bob/bio/base/database/filelist/query.py
index c3454093..4bb6487b 100644
--- a/bob/bio/base/database/filelist/query.py
+++ b/bob/bio/base/database/filelist/query.py
@@ -130,7 +130,6 @@ class FileListBioDatabase(ZTBioDatabase):
         and the given sub-directories and file names (which default to useful values if not given)."""
 
         super(FileListBioDatabase, self).__init__(
-            filelists_directory=filelists_directory,
             name=name,
             protocol=protocol,
             original_directory=original_directory,
@@ -138,7 +137,10 @@ class FileListBioDatabase(ZTBioDatabase):
             annotation_directory=annotation_directory,
             annotation_extension=annotation_extension,
             annotation_type=annotation_type,
-            # extra args for pretty printing
+            **kwargs)
+        # extra args for pretty printing
+        self._kwargs.update(dict(
+            filelists_directory=filelists_directory,
             dev_sub_directory=dev_sub_directory,
             eval_sub_directory=eval_sub_directory,
             world_filename=world_filename,
@@ -150,9 +152,10 @@ class FileListBioDatabase(ZTBioDatabase):
             tnorm_filename=tnorm_filename,
             znorm_filename=znorm_filename,
             use_dense_probe_file_list=use_dense_probe_file_list,
-            # if both probe_filename and scores_filename are given, what kind of list should be used?
+            # if both probe_filename and scores_filename are given, what kind
+            # of list should be used?
             keep_read_lists_in_memory=keep_read_lists_in_memory,
-            **kwargs)
+        ))
         # self.original_directory = original_directory
         # self.original_extension = original_extension
         self.bio_file_class = bio_file_class
-- 
GitLab