Let's download things once only, instead of 3 times.

This commit is contained in:
Raoul Snyman 2015-10-14 23:19:02 +02:00
parent 924d0f8b29
commit 191a739f81
1 changed files with 1 additions and 0 deletions

View File

@ -404,6 +404,7 @@ def get_web_page(url, header=None, update_openlp=False):
try:
page = urllib.request.urlopen(req, timeout=CONNECTION_TIMEOUT)
log.debug('Downloaded page {}'.format(page.geturl()))
break
except urllib.error.URLError as err:
log.exception('URLError on {}'.format(url))
log.exception('URLError: {}'.format(err.reason))