ref: refs/heads/master
commit 6514e4d000dffc82a6f34f6b42ce2b123706a34f
Author: Duncan Mac-Vicar P
Date: Wed Oct 28 16:01:41 2009 +0100
no logs if the config file is not set
---
plugins/status/app/controllers/logs_controller.rb | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/plugins/status/app/controllers/logs_controller.rb b/plugins/status/app/controllers/logs_controller.rb
index 115d4a4..3531d21 100644
--- a/plugins/status/app/controllers/logs_controller.rb
+++ b/plugins/status/app/controllers/logs_controller.rb
@@ -15,12 +15,16 @@ class LogsController < ApplicationController
xml.instruct!
xml.logs(:type => :array) do
- @cfg.each do |logid, logdata|
- xml.log do
- xml.id logid
- xml.path logdata["path"]
- xml.description logdata["description"]
+ begin
+ @cfg.each do |logid, logdata|
+ xml.log do
+ xml.id logid
+ xml.path logdata["path"]
+ xml.description logdata["description"]
+ end
end
+ rescue YaST::ConfigFile::NotFoundError => error
+ logger.error "config file #{CONFIG_FILE} not found"
end
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org