s3_saver.py
def delete(self, filename, storage_type=None, bucket_name=None):
        """Deletes the specified file, either locally or from S3, depending on the file's storage type."""

        if not (storage_type and bucket_name):
            self._delete_local(filename)
        else:
            if storage_type != 's3':
                raise ValueError('Storage type "%s" is invalid, the only supported storage type (apart from default local storage) is s3.' % storage_type)

            self._delete_s3(filename, bucket_name)
def delete(self, filename, storage_type=None, bucket_name=None):
        """Deletes the specified file, either locally or from S3, depending on the file's storage type."""

        if not (storage_type and bucket_name):
            self._delete_local(filename)
        else:
            if storage_type != 's3':
                raise ValueError('Storage type "%s" is invalid, the only supported storage type (apart from default local storage) is s3.' % storage_type)

            self._delete_s3(filename, bucket_name)
Deletes the specified file, either locally or from S3, depending on the file's storage type.