Mailinglist Archive: yast-devel (233 mails)

< Previous Next >
Re: [yast-devel] Re: [yast-commit] <web-client> master : test on empty list
  • From: Stefan Schubert <schubi@xxxxxxxxxx>
  • Date: Thu, 08 Oct 2009 15:50:15 +0200
  • Message-id: <4ACDEE17.2000306@xxxxxxxxxx>
Josef Reidinger schrieb:
Stefan Schubert write:
ref: refs/heads/master
commit dd33d008822d216d94a061fcfc2017385c7fb0f9
Author: Stefan Schubert <schubi@xxxxxxx>
Date: Thu Oct 8 13:50:13 2009 +0200

test on empty list
---
.../app/controllers/patch_updates_controller.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git
a/plugins/patch_updates/app/controllers/patch_updates_controller.rb
b/plugins/patch_updates/app/controllers/patch_updates_controller.rb index
507b97f..8f25528 100644
--- a/plugins/patch_updates/app/controllers/patch_updates_controller.rb
+++ b/plugins/patch_updates/app/controllers/patch_updates_controller.rb
@@ -86,7 +86,7 @@ class PatchUpdatesController < ApplicationController

flash.clear #no flash from load_proxy
last_patch = ""
- if patch_updates
+ if patch_updates.size > 0
Yes, you are right. "blank?" checks both. Thank you for the hint.

diff --git a/plugins/patch_updates/app/controllers/patch_updates_controller.rb b/plugins/patch_updates/app/controllers/patch_updates_controller.rb
index 8f25528..7df017c 100644
--- a/plugins/patch_updates/app/controllers/patch_updates_controller.rb
+++ b/plugins/patch_updates/app/controllers/patch_updates_controller.rb
@@ -86,7 +86,7 @@ class PatchUpdatesController < ApplicationController

flash.clear #no flash from load_proxy
last_patch = ""
- if patch_updates.size > 0
+ if !patch_updates.blank?
#installing the first available patch
logger.info "Installing patch :#{patch_updates[0].name}"
begin


--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
References