forked from openlp/openlp
Reraise exception if retries > CONNECTION_RETRIES
This commit is contained in:
parent
fd81d2d80a
commit
b62bb37776
@ -407,16 +407,24 @@ def get_web_page(url, header=None, update_openlp=False):
|
||||
log.exception('URLError on {}'.format(url))
|
||||
log.exception('URLError: {}'.format(err.reason))
|
||||
page = None
|
||||
if retries > CONNECTION_RETRIES:
|
||||
raise
|
||||
except socket.timeout:
|
||||
log.exception('Socket timeout: {}'.format(url))
|
||||
page = None
|
||||
if retries > CONNECTION_RETRIES:
|
||||
raise
|
||||
except ConnectionRefusedError:
|
||||
log.exception('ConnectionRefused: {}'.format(url))
|
||||
page = None
|
||||
if retries > CONNECTION_RETRIES:
|
||||
raise
|
||||
break
|
||||
except ConnectionError:
|
||||
log.exception('Connection error: {}'.format(url))
|
||||
page = None
|
||||
if retries > CONNECTION_RETRIES:
|
||||
raise
|
||||
except:
|
||||
# Don't know what's happening, so reraise the original
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user