From 7d49dd7d4cec9ba67bceeefd1627667564a62c3f Mon Sep 17 00:00:00 2001 From: James Socol Date: Fri, 7 May 2010 00:35:33 -0700 Subject: [PATCH] Catch socket.error in BuildExcerpts --- apps/search/clients.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/search/clients.py b/apps/search/clients.py index e7ddd7eed..9f425bfb7 100644 --- a/apps/search/clients.py +++ b/apps/search/clients.py @@ -127,6 +127,9 @@ class SearchClient(object): documents, self.index, query, {'limit': settings.SEARCH_SUMMARY_LENGTH * settings.SEARCH_SUMMARY_LENGTH_MULTIPLIER})[0] + except socket.error: + log.error('Socket error building excerpt!') + raw_excerpt = '' except socket.timeout: log.error('Building excerpt timed out!') raw_excerpt = ''