From ed59af99e1a5eff6fe7498374bbcaf1119c890a1 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 28 Sep 2022 09:39:44 +0200 Subject: [PATCH] Better exception handling in lib/webhooks/module_info.py --- lib/webhooks/module_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/webhooks/module_info.py b/lib/webhooks/module_info.py index 40e235a..2c60e04 100644 --- a/lib/webhooks/module_info.py +++ b/lib/webhooks/module_info.py @@ -29,7 +29,7 @@ from .base_module_info import BaseModuleInfoError, BaseModuleInfo from .forge import parse_forge_date -__version__ = '1.5.1' +__version__ = '1.5.2' LOG = logging.getLogger(__name__) @@ -561,6 +561,9 @@ class ModuleInfo(BaseModuleInfo): except requests.exceptions.ReadTimeout as e: LOG.error("{c}: {e}".format(c=e.__class__.__name__, e=e)) return None + except requests.exceptions.ConnectionError as e: + LOG.error("{c}: {e}".format(c=e.__class__.__name__, e=e)) + return None LOG.debug(_("Got status code: {}.").format(response.status_code)) if not response.ok: -- 2.39.5