Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Remove nonexistent method
Browse files Browse the repository at this point in the history
The PySolr response is not a Requests response. It will raise its
own exception.
  • Loading branch information
Mike Graves committed Jun 15, 2015
1 parent 163ff92 commit 617f32e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions kepler/services/solr.py
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import json
import pysolr
import requests


class SolrServiceManager(object):
"""Service to a GeoBlacklight (Solr) instance
Expand All @@ -24,8 +23,7 @@ def postMetaDataToServer(self, records):
"""
for record in records:
self._validateRecord(record)
response = self.connection.add(records)
response.raise_for_status()
self.connection.add(records)

def _validateRecord(self, record):
"""Validate metadata record to match solr config
Expand All @@ -34,4 +32,4 @@ def _validateRecord(self, record):
:raises AttributeError: when missing required key
"""
if not ('uuid' in record):
raise AttributeError("missing uuid")
raise AttributeError("missing uuid")

0 comments on commit 617f32e

Please sign in to comment.