From d311066dd43bdc4598fa76837d78ecfac16f5e58 Mon Sep 17 00:00:00 2001 From: Bertrand Lallau Date: Sat, 1 Feb 2014 14:33:33 +0100 Subject: [PATCH] Remove a catching exception during delete_volume GlanceMetadataNotFound Exception was catching during a call to volume_glance_metadata_delete_by_volume(). This exception is never thrown by the implementation. This catching has been removed. Change-Id: Ifa15df5d9c4517f75a1a050ff5aa34225f33931b Closes-Bug: #1274601 --- cinder/volume/manager.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 63813f319..100cc422c 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -422,13 +422,7 @@ class VolumeManager(manager.SchedulerDependentManager): LOG.exception(_("Failed to update usages deleting volume")) # Delete glance metadata if it exists - try: - self.db.volume_glance_metadata_delete_by_volume(context, volume_id) - LOG.debug(_("volume %s: glance metadata deleted"), - volume_ref['id']) - except exception.GlanceMetadataNotFound: - LOG.debug(_("no glance metadata found for volume %s"), - volume_ref['id']) + self.db.volume_glance_metadata_delete_by_volume(context, volume_id) self.db.volume_destroy(context, volume_id) LOG.info(_("volume %s: deleted successfully"), volume_ref['id']) -- 2.45.2