Revision d0b67cbc snf-pithos-app/pithos/api/functions.py

b/snf-pithos-app/pithos/api/functions.py
945 945
            raise faults.ItemNotFound('Object does not exist')
946 946
        except VersionNotExists:
947 947
            raise faults.ItemNotFound('Version does not exist')
948
        except IllegalOperationError, e:
949
            raise faults.Forbidden(str(e))
948 950
    else:
949 951
        try:
950 952
            s, h = request.backend.get_object_hashmap(
......
958 960
            raise faults.ItemNotFound('Object does not exist')
959 961
        except VersionNotExists:
960 962
            raise faults.ItemNotFound('Version does not exist')
963
        except IllegalOperationError, e:
964
            raise faults.Forbidden(str(e))
961 965

  
962 966
    # Reply with the hashmap.
963 967
    if hashmap_reply:
......
1371 1375
        raise faults.Forbidden('Not allowed')
1372 1376
    except ItemNotExists:
1373 1377
        raise faults.ItemNotFound('Object does not exist')
1378
    except IllegalOperationError, e:
1379
        raise faults.Forbidden(str(e))
1374 1380

  
1375 1381
    offset, length, total = ranges
1376 1382
    if offset is None:
......
1396 1402
            raise faults.Forbidden('Not allowed')
1397 1403
        except ItemNotExists:
1398 1404
            raise faults.ItemNotFound('Source object does not exist')
1405
        except IllegalOperationError, e:
1406
            raise faults.Forbidden(str(e))
1399 1407

  
1400 1408
        if length is None:
1401 1409
            length = src_size

Also available in: Unified diff