mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -05:00
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.
This commit is contained in:
parent
ed88fb1302
commit
392232fb6a
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue