Skip to content
Snippets Groups Projects
Commit 29472d23 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

use a warning instead of an error

parent 9bb4f2f6
No related branches found
No related tags found
1 merge request!131Add annotator support
......@@ -131,6 +131,9 @@ def load_resource(resource, keyword, imports = ['bob.bio.base'], package_prefix=
if os.path.isfile(resource):
return read_config_file([resource], keyword)
if keyword not in valid_keywords:
logger.warning("The given keyword '%s' is not valid. Please use one of %s!", keyword, valid_keywords)
# now, we check if the resource is registered as an entry point in the resource files
entry_points = [entry_point for entry_point in _get_entry_points(keyword, package_prefix=package_prefix) if entry_point.name == resource]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment