Commit a38bc041 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Fix exception for missing snapshots

parent c98d9814
......@@ -15,8 +15,11 @@ def get_volume(user_id, volume_id, for_update=False,
def get_snapshot(user_id, snapshot_id, exception=faults.ItemNotFound):
with image_backend(user_id) as b:
return b.get_snapshot(user_id, snapshot_id)
try:
with image_backend(user_id) as b:
return b.get_snapshot(user_id, snapshot_id)
except faults.ItemNotFound:
raise exception("Snapshot %s not found" % snapshot_id)
def get_image(user_id, image_id, exception=faults.ItemNotFound):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment