From: Frank Brehm Date: Wed, 28 Sep 2022 07:39:44 +0000 (+0200) Subject: Better exception handling in lib/webhooks/module_info.py X-Git-Tag: 1.7.9^2~1 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=ed59af99e1a5eff6fe7498374bbcaf1119c890a1;p=pixelpark%2Fpuppetmaster-webhooks.git Better exception handling in lib/webhooks/module_info.py --- 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: