Skip to content
Snippets Groups Projects
Commit 28b19782 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[utils] fixed the function to get parameters

parent 1993f935
Branches
Tags
1 merge request!6Resolve "Package depends on both bob.db.cohface and bob.db.hci_tagging"
...@@ -145,10 +145,15 @@ def get_parameter(args, configuration, keyword, default): ...@@ -145,10 +145,15 @@ def get_parameter(args, configuration, keyword, default):
# get the argument in the configuration file # get the argument in the configuration file
if hasattr(configuration, keyword): if hasattr(configuration, keyword):
arg_config = getattr(configuration, keyword) arg_config = getattr(configuration, keyword)
else:
arg_config = None
# get the argument from the command-line # get the argument from the command-line
arg_command = _type(args[args_kw]) if default is not None:
arg_command = _type(args[args_kw])
else:
arg_command = default
# if the argument was not specified in the config file # if the argument was not specified in the config file
if not hasattr(configuration, keyword): if not hasattr(configuration, keyword):
return arg_command return arg_command
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment