Revision 3a5994a8 snf-pithos-app/pithos/api/functions.py

b/snf-pithos-app/pithos/api/functions.py
66 66

  
67 67
from pithos.backends.base import (
68 68
    NotAllowedError, QuotaError, ContainerNotEmpty, ItemNotExists,
69
    VersionNotExists, ContainerExists)
69
    VersionNotExists, ContainerExists, InvalidHash)
70 70

  
71 71
from pithos.backends.filter import parse_filters
72 72

  
......
1115 1115
        raise faults.BadRequest('Invalid sharing header')
1116 1116
    except QuotaError, e:
1117 1117
        raise faults.RequestEntityTooLarge('Quota error: %s' % e)
1118
    except InvalidHash, e:
1119
        raise faults.BadRequest('Invalid hash: %s' % e)
1118 1120
    if not checksum and UPDATE_MD5:
1119 1121
        # Update the MD5 after the hashmap, as there may be missing hashes.
1120 1122
        checksum = hashmap_md5(request.backend, hashmap, size)

Also available in: Unified diff