Revision 63338c2d snf-cyclades-app/synnefo/volume/util.py

b/snf-cyclades-app/synnefo/volume/util.py
15 15

  
16 16

  
17 17
def get_snapshot(user_id, snapshot_id, exception=faults.ItemNotFound):
18
    with image_backend(user_id) as b:
19
        return b.get_snapshot(user_id, snapshot_id)
18
    try:
19
        with image_backend(user_id) as b:
20
            return b.get_snapshot(user_id, snapshot_id)
21
    except faults.ItemNotFound:
22
        raise exception("Snapshot %s not found" % snapshot_id)
20 23

  
21 24

  
22 25
def get_image(user_id, image_id, exception=faults.ItemNotFound):

Also available in: Unified diff