ref: refs/heads/network commit 1e2626823011b7c9d2219e34d248dc4e0c3b66bc Author: Josef Reidinger <jreidinger@suse.cz> Date: Thu Sep 10 12:21:25 2009 +0200 fix writing finished base system settings --- .../app/controllers/basesystem_controller.rb | 4 +- webservice/lib/exceptions.rb | 22 +++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/plugins/basesystem/app/controllers/basesystem_controller.rb b/plugins/basesystem/app/controllers/basesystem_controller.rb index 765d47b..cb02903 100644 --- a/plugins/basesystem/app/controllers/basesystem_controller.rb +++ b/plugins/basesystem/app/controllers/basesystem_controller.rb @@ -11,8 +11,8 @@ class BasesystemController < ApplicationController end def update - @basesystem = Basesystem.new - @basesystem.finish = params[:finish] + @basesystem = Basesystem.new + @basesystem.finish = params[:basesystem][:finish] @basesystem.save render :show end diff --git a/webservice/lib/exceptions.rb b/webservice/lib/exceptions.rb index 8601417..122887a 100644 --- a/webservice/lib/exceptions.rb +++ b/webservice/lib/exceptions.rb @@ -56,7 +56,7 @@ class PolicyKitException < BackendException @message = message @user = user @permission = permission - super("Policy kit exception for user #{user} and permission #{permission}: #{message}.") + super "Policy kit exception for user #{user} and permission #{permission}: #{message}." end def to_xml @@ -72,3 +72,23 @@ class PolicyKitException < BackendException end end end + +# Exception that signalizes that target file is missing or corrupted +# for bad configuration in file use own exception with better explanation what is wrong +class CorruptedFileException < BackendException + def initialize(file) + @file = file + super "Target system is not consistent: Missing or corrupted file #{@file}" + end + + def to_xml + xml = Builder::XmlMarkup.new({}) + xml.instruct! + + xml.error do + xml.type "BADFILE" + xml.description message + xml.file @file + end + end +end -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org