Skip to content

Commit 4f38d6c

Browse files
committed
Add additional exception catch
1 parent ac0a7da commit 4f38d6c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/pyobo/getters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import bioregistry
2222
import click
2323
import pystow.utils
24+
import requests.exceptions
2425
from tabulate import tabulate
2526
from tqdm.auto import tqdm
2627
from typing_extensions import Unpack
@@ -366,7 +367,7 @@ def iter_helper_helper(
366367
logger.warning("[%s] HTTP %s: unable to download %s", prefix, e.getcode(), e.geturl())
367368
if strict and not bioregistry.is_deprecated(prefix):
368369
raise
369-
except urllib.error.URLError as e:
370+
except (urllib.error.URLError, requests.exceptions.ConnectTimeout) as e:
370371
logger.warning("[%s] unable to download - %s", prefix, e.reason)
371372
if strict and not bioregistry.is_deprecated(prefix):
372373
raise

0 commit comments

Comments
 (0)