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 distutils.version import LooseVersion
|
||||
from http.client import HTTPException
|
||||
import logging
|
||||
import locale
|
||||
import os
|
||||
@ -430,6 +431,11 @@ def get_web_page(url, header=None, update_openlp=False):
|
||||
page = None
|
||||
if retries > CONNECTION_RETRIES:
|
||||
raise
|
||||
except HTTPException:
|
||||
log.exception('HTTPException 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