From 29472d233366d03adf76711069522f432142c991 Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Thu, 25 Jan 2018 12:13:15 +0100
Subject: [PATCH] use a warning instead of an error

---
 bob/bio/base/utils/resources.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bob/bio/base/utils/resources.py b/bob/bio/base/utils/resources.py
index 9a60db4b..5f6f4c13 100644
--- a/bob/bio/base/utils/resources.py
+++ b/bob/bio/base/utils/resources.py
@@ -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]
 
-- 
GitLab