forked from openlp/openlp
Let's download things once only, instead of 3 times.
This commit is contained in:
parent
924d0f8b29
commit
191a739f81
@ -404,6 +404,7 @@ def get_web_page(url, header=None, update_openlp=False):
|
|||||||
try:
|
try:
|
||||||
page = urllib.request.urlopen(req, timeout=CONNECTION_TIMEOUT)
|
page = urllib.request.urlopen(req, timeout=CONNECTION_TIMEOUT)
|
||||||
log.debug('Downloaded page {}'.format(page.geturl()))
|
log.debug('Downloaded page {}'.format(page.geturl()))
|
||||||
|
break
|
||||||
except urllib.error.URLError as err:
|
except urllib.error.URLError as err:
|
||||||
log.exception('URLError on {}'.format(url))
|
log.exception('URLError on {}'.format(url))
|
||||||
log.exception('URLError: {}'.format(err.reason))
|
log.exception('URLError: {}'.format(err.reason))
|
||||||
|
Loading…
Reference in New Issue
Block a user