Do not care if an attachment could not be deleted

This commit is contained in:
Guewen Baconnier
2016-11-07 09:50:26 +01:00
parent 8400c0f34e
commit 7f262799cf
+1 -5
View File
@@ -156,15 +156,11 @@ class IrAttachment(models.Model):
if not count and filekey:
try:
filekey.delete()
except S3ResponseError as error:
except S3ResponseError:
# log verbose error from s3, return short message for user
_logger.exception(
'Error during deletion of the file %s' % fname
)
raise exceptions.UserError(
_('The file could not be deleted: %s') %
(self._parse_s3_error(error),)
)
else:
super(IrAttachment, self)._file_delete(fname)