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)
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)
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)