Skip to content
Snippets Groups Projects
Commit 8ec5b882 authored by ale's avatar ale
Browse files

do something after having caught the error...

parent b930cf4c
Branches
No related tags found
No related merge requests found
import logging
import solr
from collections import defaultdict
log = logging.getLogger(__name__)
class Searcher(object):
......@@ -14,6 +17,7 @@ class Searcher(object):
except solr.SolrException, e:
log.error('SOLR exception (query="%s"): %s' % (
qstr, e))
return
for doc in results.results:
yield doc['score'], doc['id']
......@@ -27,6 +31,7 @@ class Searcher(object):
except solr.SolrException, e:
log.error('SOLR exception (query="%s"): %s' % (
query_str, e))
return []
# Parse and uniq-ify the results.
hashes_set = set(hashes)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment