Example #1
0
 def delete(self, preview_size, transformations):
     cache_cleanup(self.filepath, size=preview_size, transformations=transformations)
     try:
         os.unlink(self.filepath)
     except OSError, exc:
         if exc.errno == errno.ENOENT:
             pass
         else:
             raise OSError(ugettext(u'Unable to delete staging file: %s') % exc)
Example #2
0
 def delete(self):
     tranformation_string, errors = get_transformation_string(DEFAULT_TRANSFORMATIONS)
     cache_cleanup(self.filepath, size=STAGING_FILES_PREVIEW_SIZE, extra_options=tranformation_string)
     try:
         os.unlink(self.filepath)
     except OSError, exc:
         if exc.errno == errno.ENOENT:
             pass
         else:
             raise OSError(ugettext(u'Unable to delete staging file: %s') % exc)
Example #3
0
 def delete(self, preview_size, transformations):
     cache_cleanup(self.filepath,
                   size=preview_size,
                   transformations=transformations)
     try:
         os.unlink(self.filepath)
     except OSError, exc:
         if exc.errno == errno.ENOENT:
             pass
         else:
             raise OSError(
                 ugettext(u'Unable to delete staging file: %s') % exc)