From 191a739f8187bad512132d0d117cb3cde40d2b47 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Wed, 14 Oct 2015 23:19:02 +0200 Subject: [PATCH] Let's download things once only, instead of 3 times. --- openlp/core/utils/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 974db7b06..38dd1fa0c 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -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))