1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

L #-: Several small linting fixes

This commit is contained in:
Tino Vázquez 2022-10-07 13:54:04 +02:00
parent 6e14f51ab9
commit 21dc3c8e8c
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
3 changed files with 3 additions and 7 deletions

View File

@ -110,8 +110,7 @@ end
def find_image_type(target_file)
target_file_type=nil
Open3.popen3("qemu-img info #{target_file}") do
|_stdin, stdout, stderr, wait_thr|
Open3.popen3("qemu-img info #{target_file}") do |_stdin, stdout, stderr, wait_thr|
unless wait_thr.value.success?
raise StandardError,
"'qemu-img info' failed, stderr: #{stderr.read}"

View File

@ -549,8 +549,7 @@ module OpenNebula
end
if role['elasticity_policies']
role['elasticity_policies'].each_with_index do |policy,
index|
role['elasticity_policies'].each_with_index do |policy, index|
exp = policy['expression']
if exp.empty?

View File

@ -63,9 +63,7 @@ module OpenNebula::TemplateExt
#---------------------------------------------------------------
logger.info 'Processing VM disks' if logger
retrieve_xmlelements('TEMPLATE/DISK').each_with_index do
|disk, idx|
retrieve_xmlelements('TEMPLATE/DISK').each_with_index do |disk, idx|
image = image_lookup(disk)
next unless image