deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH core] Fix valid_provider_url? to return a boolean value
Date Tue, 28 Feb 2012 13:55:42 GMT
Hi Tomas,

ACK. Good catch!

  -- Michal


Michal Fojtik
http://deltacloud.org
mfojtik@redhat.com



On Feb 24, 2012, at 4:13 PM, tsedovic@redhat.com wrote:

> From: Tomas Sedovic <tomas@sedovic.cz>
> 
> Calling `client.driver('rhevm').valid_provider_url?` used to return an array of
> true/false values instead of a single boolean.
> ---
> client/lib/base_object.rb |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/client/lib/base_object.rb b/client/lib/base_object.rb
> index fb9738f..5f63b5d 100644
> --- a/client/lib/base_object.rb
> +++ b/client/lib/base_object.rb
> @@ -151,7 +151,7 @@ module DeltaCloud
>             return providers.any? { |p| p.keys.include? args.first.to_sym }
>           end
>           if method_name == :"valid_provider_url?"
> -            return providers.map { |p| !p.find { |k, v| v.find { |u| u[:url] == args.first
} }.nil? }
> +            return providers.any? { |p| !p.find { |k, v| v.find { |u| u[:url] == args.first
} }.nil? }
>           end
>           super
>         else
> -- 
> 1.7.6.5
> 


Mime
View raw message