Skip to content

Commit

Permalink
Fixed a bug where server_string could come back as None. Than…
Browse files Browse the repository at this point in the history
…ks to croddy for the report!
  • Loading branch information
toastdriven committed Jun 8, 2011
1 parent fecaf51 commit d41e209
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pysolr.py
Expand Up @@ -416,10 +416,10 @@ def _scrape_response(self, headers, response):
server_type = None
server_string = headers.get('server', '')

if 'jetty' in server_string.lower():
if server_string and 'jetty' in server_string.lower():
server_type = 'jetty'

if 'coyote' in server_string.lower():
if server_string and 'coyote' in server_string.lower():
# TODO: During the pysolr 3 effort, make this no longer a
# conditional and consider using ``lxml.html`` instead.
from BeautifulSoup import BeautifulSoup
Expand Down

0 comments on commit d41e209

Please sign in to comment.