1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

bug #4103: fix bug when an object does not exist

(cherry picked from commit 547f61c31883b19e09ff14673f5d9c5e4d10bb8d)
This commit is contained in:
Javi Fontan 2015-11-17 14:57:31 +01:00
parent 6bbe71a386
commit f6a566b8f6

View File

@ -204,7 +204,7 @@ class VIClient
return vms.find do |v|
begin
v.config && v.config.uuid == uuid
rescue ManagedObjectNotFound
rescue RbVmomi::VIM::ManagedObjectNotFound
false
end
end
@ -221,7 +221,7 @@ class VIClient
return vms.find do |v|
begin
v.name == vm_name
rescue ManagedObjectNotFound
rescue RbVmomi::VIM::ManagedObjectNotFound
false
end
end