ref: refs/heads/backgroud_patches_bnc550934
commit a59b16183d3795e8552f4397784cef8d7b88c5d4
Author: Josef Reidinger
Date: Fri Nov 13 13:57:30 2009 +0100
don't show flash on each exception (at first not every exception must be catched and at second this method is used in ajax call which must not set flash message as it appear on next page which is not intended) (bnc#555235)
---
.../status/app/controllers/status_controller.rb | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/plugins/status/app/controllers/status_controller.rb b/plugins/status/app/controllers/status_controller.rb
index 7b4cf03..5921a8f 100644
--- a/plugins/status/app/controllers/status_controller.rb
+++ b/plugins/status/app/controllers/status_controller.rb
@@ -101,15 +101,10 @@ class StatusController < ApplicationController
till = Time.new
from = till - 300 #last 5 minutes
- begin
- ActionController::Base.benchmark("Status data read from the server") do
- status = @client.find(:dummy_param, :params => { :start => from.to_i.to_s, :stop => till.to_i.to_s })
- end
- create_data_map status
- rescue Exception => e
- flash[:warning] = e.message
- logger.warn e
+ ActionController::Base.benchmark("Status data read from the server") do
+ status = @client.find(:dummy_param, :params => { :start => from.to_i.to_s, :stop => till.to_i.to_s })
end
+ create_data_map status
# logger.debug @data_group.inspect
#checking if there is one valid data entry at least
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org