Skip to content
Snippets Groups Projects
Commit 9eb1e90c authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Fix use of read_config_file() at other points

parent 74e20601
No related branches found
No related tags found
1 merge request!36Suggests configuration file should be the default "way" with `verify.py`
Pipeline #
...@@ -406,7 +406,7 @@ def main(command_line_parameters = None): ...@@ -406,7 +406,7 @@ def main(command_line_parameters = None):
command_line_options(command_line_parameters) command_line_options(command_line_parameters)
global configuration, place_holder_key global configuration, place_holder_key
configuration = utils.read_config_file(args.configuration_file) configuration = utils.read_config_file([args.configuration_file])
place_holder_key = args.place_holder_key place_holder_key = args.place_holder_key
if args.preprocessor: if args.preprocessor:
......
...@@ -47,7 +47,7 @@ def _collect_config(paths): ...@@ -47,7 +47,7 @@ def _collect_config(paths):
def _attach_resources(src, dst): def _attach_resources(src, dst):
for k in dir(src): for k in dir(src):
dst.__dict__[k] = getattr(src, k) setattr(dst, k, getattr(src, k))
import random import random
...@@ -170,7 +170,7 @@ def load_resource(resource, keyword, imports = ['bob.bio.base'], package_prefix= ...@@ -170,7 +170,7 @@ def load_resource(resource, keyword, imports = ['bob.bio.base'], package_prefix=
# first, look if the resource is a file name # first, look if the resource is a file name
if os.path.isfile(resource): if os.path.isfile(resource):
return read_config_file(resource, keyword) return read_config_file([resource], keyword)
if keyword not in valid_keywords: if keyword not in valid_keywords:
raise ValueError("The given keyword '%s' is not valid. Please use one of %s!" % (str(keyword), str(valid_keywords))) raise ValueError("The given keyword '%s' is not valid. Please use one of %s!" % (str(keyword), str(valid_keywords)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment