From 392232fb6a9125288aa69dd26938bf78bef43f74 Mon Sep 17 00:00:00 2001 From: Brandon High Date: Thu, 5 Mar 2020 17:13:51 -0800 Subject: [PATCH] Remove duplicated return statements This commit removes two duplicate return statements in both branches of a conditional with one return statement outside the conditional blocks. --- lib/vmpooler/providers/vsphere.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vmpooler/providers/vsphere.rb b/lib/vmpooler/providers/vsphere.rb index ad5e86c..6740423 100644 --- a/lib/vmpooler/providers/vsphere.rb +++ b/lib/vmpooler/providers/vsphere.rb @@ -242,7 +242,6 @@ module Vmpooler target[dc]['hosts'].delete(host) target[dc]['hosts'] << host end - return host else raise("there is no candidate in vcenter that meets all the required conditions, that the cluster has available hosts in a 'green' status, not in maintenance mode and not overloaded CPU and memory") unless target[dc].key?('hosts') @@ -251,8 +250,9 @@ module Vmpooler target[dc]['architectures'].each do |arch| target[dc]['architectures'][arch] = arch.partition { |v| v != host }.flatten if arch.include?(host) end - return host end + + return host end end