[PATCH 1/1] configuration: warning on trying to load non-existant filename

Martin Zenzes martin.zenzes at dfki.de
Fri Nov 22 15:59:18 CET 2013


Signed-off-by: Martin Zenzes <martin.zenzes at dfki.de>
---
 lib/orocos/configurations.rb |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/orocos/configurations.rb b/lib/orocos/configurations.rb
index dbc8c58..3af2e11 100644
--- a/lib/orocos/configurations.rb
+++ b/lib/orocos/configurations.rb
@@ -635,7 +635,11 @@ def load_dir(dir)
         # Otherwise, it returns a mapping from task model names to the list of
         # configuration sections that have changed for this particular model
         def load_file(file,model_name = nil)
-            return if !File.file?(file)
+            if !File.file?(file)
+                ConfigurationManager.warn "ignoring configuration file #{file}, not existent"
+                return
+            end
+
             model_name ||= File.basename(file, '.yml')
 
             begin
-- 
1.7.9.5


--------------080009090903080309040703--


More information about the Rock-dev mailing list