M #-: Fix bug introduced in latest linting

(cherry picked from commit e528704818)
This commit is contained in:
Tino Vazquez committed 2019-12-19 13:10:30 +01:00
1 parent 9ac5f03a60
commit 519f499934
1 file changed
+2 -1
+2 -1
View File
@@ -88,7 +88,8 @@ begin
vi_client = VCenterDriver::VIClient.new_from_host(host_id)
disk_xpath ="TEMPLATE/DISK[SOURCE=\"#{src_path_escaped}\"]"
one_disk = one_vm.retrieve_xmlelements(disk_xpath) rescue nil
one_disk.select! {|e| e['DISK_ID'] == disk_id }.first if one_disk
one_disk.select! {|e| e['DISK_ID'] == disk_id }
one_disk = one_disk.first if one_disk
raise 'Cannot find disk element in vm template' unless one_disk