From 703bc36e5e1ad6c470ea507149cc5f2407b4674b Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sat, 21 Dec 2024 00:46:02 -0600 Subject: [PATCH] In the rest policy, also catch URLError --- britney2/policies/rest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/britney2/policies/rest.py b/britney2/policies/rest.py index 0b1fc80..8d15833 100644 --- a/britney2/policies/rest.py +++ b/britney2/policies/rest.py @@ -4,7 +4,7 @@ import urllib.request import urllib.parse from collections import defaultdict -from urllib.error import HTTPError +from urllib.error import HTTPError, URLError LAUNCHPAD_URL = "https://api.launchpad.net/1.0/" @@ -39,7 +39,7 @@ class Rest: % (url, 5 - retry - 1) ) exc = e - except HTTPError as e: + except (HTTPError, URLError) as e: if e.code not in (503, 502): raise self.logger.info(