From: Jenkins Date: Tue, 30 Jun 2015 23:31:03 +0000 (+0000) Subject: Merge "Change generic NotFound to specific exception" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e66daeb6dce24999127420626c4062f8cdc83fd9;p=openstack-build%2Fcinder-build.git Merge "Change generic NotFound to specific exception" --- e66daeb6dce24999127420626c4062f8cdc83fd9 diff --cc cinder/api/v2/snapshots.py index 45c7ac471,e1140ca37..b91332c34 --- a/cinder/api/v2/snapshots.py +++ b/cinder/api/v2/snapshots.py @@@ -262,12 -258,9 +259,11 @@@ class SnapshotsController(wsgi.Controll try: snapshot = self.volume_api.get_snapshot(context, id) + volume_utils.notify_about_snapshot_usage(context, snapshot, + 'update.start') self.volume_api.update_snapshot(context, snapshot, update_dict) - except exception.NotFound: - msg = _("Snapshot could not be found") - raise exc.HTTPNotFound(explanation=msg) + except exception.SnapshotNotFound as error: + raise exc.HTTPNotFound(explanation=error.msg) snapshot.update(update_dict) req.cache_db_snapshot(snapshot)