summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_vmware/rw_handles.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/oslo_vmware/rw_handles.py b/oslo_vmware/rw_handles.py
index e3769ec..a7b3e72 100644
--- a/oslo_vmware/rw_handles.py
+++ b/oslo_vmware/rw_handles.py
@@ -556,6 +556,10 @@ class VmdkWriteHandle(VmdkHandle):
"""
try:
self._release_lease()
+ except exceptions.ManagedObjectNotFoundException:
+ LOG.info("Lease for %(url)s not found. No need to release.",
+ {'url': self._url})
+ return
except exceptions.VimException:
LOG.warning("Error occurred while releasing the lease "
"for %s.",
@@ -637,6 +641,10 @@ class VmdkReadHandle(VmdkHandle):
"""
try:
self._release_lease()
+ except exceptions.ManagedObjectNotFoundException:
+ LOG.info("Lease for %(url)s not found. No need to release.",
+ {'url': self._url})
+ return
except exceptions.VimException:
LOG.warning("Error occurred while releasing the lease "
"for %s.",