forked from openlp/openlp
Improve network exception handling, again.
This commit is contained in:
parent
7eb506fae8
commit
e3be044d5d
@ -24,6 +24,7 @@ The :mod:`openlp.core.utils` module provides the utility libraries for OpenLP.
|
|||||||
"""
|
"""
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
from http.client import HTTPException
|
||||||
import logging
|
import logging
|
||||||
import locale
|
import locale
|
||||||
import os
|
import os
|
||||||
@ -430,6 +431,11 @@ def get_web_page(url, header=None, update_openlp=False):
|
|||||||
page = None
|
page = None
|
||||||
if retries > CONNECTION_RETRIES:
|
if retries > CONNECTION_RETRIES:
|
||||||
raise
|
raise
|
||||||
|
except HTTPException:
|
||||||
|
log.exception('HTTPException error: {}'.format(url))
|
||||||
|
page = None
|
||||||
|
if retries > CONNECTION_RETRIES:
|
||||||
|
raise
|
||||||
except:
|
except:
|
||||||
# Don't know what's happening, so reraise the original
|
# Don't know what's happening, so reraise the original
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user