fixes 1194730 by returning None if the verse does not exist

This commit is contained in:
Philip Ridout 2013-08-03 21:26:46 +01:00
parent 3ec0337649
commit 2c9910d6ad
1 changed files with 2 additions and 0 deletions

View File

@ -245,6 +245,8 @@ class BGExtract(object):
return None
Receiver.send_message(u'openlp_process_events')
div = soup.find('div', 'result-text-style-normal')
if not div:
return None
self._clean_soup(div)
span_list = div.findAll('span', 'text')
log.debug('Span list: %s', span_list)