diff --git a/swh/lister/sourceforge/lister.py b/swh/lister/sourceforge/lister.py index 3d19894c7074a30213c48fd1ed267d4a6ed7c828..17592f2d617db369a20eac62830e574c86fd7230 100644 --- a/swh/lister/sourceforge/lister.py +++ b/swh/lister/sourceforge/lister.py @@ -336,7 +336,7 @@ class SourceForgeLister(Lister[SourceForgeListerState, SourceForgeListerPage]): try: res = self.http_request(endpoint).json() - except requests.HTTPError: + except (requests.HTTPError, ConnectionError): # We've already logged in `http_request` return [] @@ -358,7 +358,7 @@ class SourceForgeLister(Lister[SourceForgeListerState, SourceForgeListerPage]): cvs_info_url = f"http://{project}.cvs.sourceforge.net" try: response = self.http_request(cvs_info_url) - except requests.HTTPError: + except (requests.HTTPError, ConnectionError): logger.warning( "CVS info page could not be fetched, skipping project '%s'", project, @@ -420,7 +420,7 @@ class SourceForgeLister(Lister[SourceForgeListerState, SourceForgeListerPage]): ) ) continue - except requests.HTTPError: + except (requests.HTTPError, ConnectionError): logger.warning( "Bazaar repository page could not be fetched, skipping project '%s'", project,