Handle PreDB DNS errors
This commit is contained in:
parent
4d12e84ce2
commit
4e9219b461
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
from datetime import datetime
|
||||
from typing import NamedTuple, List
|
||||
from urllib.error import HTTPError
|
||||
from urllib.error import HTTPError, URLError
|
||||
|
||||
from . import cache
|
||||
|
||||
|
@ -25,7 +25,7 @@ def get_pres() -> List[Pre]:
|
|||
pres.update(
|
||||
(p.dirname, p) for p in get()
|
||||
) # override duplicate dirnames in later iterations
|
||||
except HTTPError as e:
|
||||
except (HTTPError, URLError) as e:
|
||||
logger.error(e)
|
||||
logger.warning("Connection to predb failed, skipping..")
|
||||
|
||||
|
|
Reference in a new issue