forked from openlp/openlp
exception, if bibleserver.com response contains no verses
This commit is contained in:
parent
a46ea7c4eb
commit
9c5177b0f7
@ -295,7 +295,13 @@ class BSExtract(object):
|
|||||||
if not soup:
|
if not soup:
|
||||||
return None
|
return None
|
||||||
Receiver.send_message(u'openlp_process_events')
|
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')
|
verse_number = re.compile(r'v\d{5}(\d{3}) verse')
|
||||||
verses = {}
|
verses = {}
|
||||||
for verse in content:
|
for verse in content:
|
||||||
|
Loading…
Reference in New Issue
Block a user