Make sure to raise the exception for WSGI and make the delete method's intent more clear

This commit is contained in:
Joseph Schorr 2014-10-08 13:51:50 -04:00
parent d16fdde528
commit bb9502ee77
2 changed files with 5 additions and 3 deletions

View file

@ -1235,9 +1235,11 @@ def find_or_create_derived_storage(source, transformation_name, preferred_locati
def delete_derived_storage_by_uuid(storage_uuid):
try:
image_storage = get_storage_by_uuid(storage_uuid)
derived_storage = DerivedImageStorage.get(derivative=image_storage)
except InvalidImageException:
return
try:
DerivedImageStorage.get(derivative=image_storage)
except DerivedImageStorage.DoesNotExist:
return

View file

@ -33,8 +33,8 @@ class QueueFile(object):
self.raised_exception = True
for handler in self._exception_handlers:
handler(result)
return
raise result
self._buffer += result
self._total_size += len(result)