Duncan Mac-Vicar P napsal(a):
> ref: refs/heads/master
> commit 6514e4d000dffc82a6f34f6b42ce2b123706a34f
> Author: Duncan Mac-Vicar P <dmacvicar(a)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(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org