exception, if bibleserver.com response contains no verses

This commit is contained in:
M2j 2010-12-17 14:33:25 +01:00
parent a46ea7c4eb
commit 9c5177b0f7

View File

@ -295,7 +295,13 @@ class BSExtract(object):
if not soup:
return None
Receiver.send_message(u'openlp_process_events')
content = soup.find(u'div', u'content').find(u'div').findAll(u'div')
try:
content = soup.find(u'div', u'content').find(u'div').findAll(u'div')
except:
log.exception(u'No verses found.')
finally:
if not content:
return None
verse_number = re.compile(r'v\d{5}(\d{3}) verse')
verses = {}
for verse in content: