summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2014-01-06 13:26:29 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2014-01-06 13:26:29 (GMT)
commit16a42c15b7c57dbf98fea0808867dc419c9507f8 (patch)
treea5f0b44522c2ac6f8eead466a03aac97bf4e0f27
parent30fac51ca6e83b70ef92b745d8a71163988f41ac (diff)
downloadcollective.solr-16a42c15b7c57dbf98fea0808867dc419c9507f8.zip
collective.solr-16a42c15b7c57dbf98fea0808867dc419c9507f8.tar.gz
collective.solr-16a42c15b7c57dbf98fea0808867dc419c9507f8.tar.bz2
add some debugging code
-rw-r--r--src/collective/solr/indexer.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/collective/solr/indexer.py b/src/collective/solr/indexer.py
index 2f7312a..23070b9 100644
--- a/src/collective/solr/indexer.py
+++ b/src/collective/solr/indexer.py
@@ -316,7 +316,11 @@ class SolrIndexProcessor(object):
continue
elif isinstance(value, (list, tuple)) and not field.multiValued:
separator = getattr(field, 'separator', ' ')
- value = separator.join(value)
+ try:
+ value = separator.join(value)
+ except UnicodeDecodeError:
+ logger.warn('collective/solr/indexer.py:322, UnicodeDecodeError on %r', value)
+ raise
if isinstance(value, str):
value = unicode(value, 'utf-8', 'ignore').encode('utf-8')
data[name] = value