[yast-devel] Re: [yast-commit] <rest-service> master : no logs if the config file is not set
Duncan Mac-Vicar P napsal(a):
ref: refs/heads/master commit 6514e4d000dffc82a6f34f6b42ce2b123706a34f Author: Duncan Mac-Vicar P <dmacvicar@suse.de> 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"
Hi, I think this is not good behavior of rest-service. If file is not found it should report it somehow other then in logger. I think it should add to xml some note, that file is not found. josef
end end
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* josef reidinger <jreidinger@suse.cz> [Oct 28. 2009 17:34]:
Hi, I think this is not good behavior of rest-service. If file is not found it should report it somehow other then in logger.
I agree.
I think it should add to xml some note, that file is not found. josef
The status window should report a user friendly message like "Status display not configured. Ask your sysadmin". Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
josef reidinger
-
Klaus Kaempf