@@ -57,7 +57,7 @@ def get_service_urls_for_participant_from_smp(participant_id, test_environment,
5757 try :
5858 r = requests .get (smp_url , timeout = timeout , headers = {"User-Agent" : user_agent })
5959 r .raise_for_status ()
60- except ( ConnectionError , requests .exceptions .RequestException ) as e :
60+ except requests .exceptions .RequestException as e :
6161 temporary = True
6262 code = 'server-error'
6363 if ((isinstance (e , requests .exceptions .HTTPError ) and e .response and e .response .status_code < 500 )
@@ -94,7 +94,7 @@ def get_service_info_for_participant_from_smp(participant_id, document_type, tes
9494 try :
9595 r = requests .get (service_url , timeout = timeout , headers = {"User-Agent" : user_agent })
9696 r .raise_for_status ()
97- except ( ConnectionError , requests .exceptions .RequestException ) as e :
97+ except requests .exceptions .RequestException as e :
9898 temporary = True
9999 code = 'server-error'
100100 if isinstance (e , requests .exceptions .HTTPError ) and e .response and e .response .status_code < 500 :
@@ -162,7 +162,7 @@ def validate_peppol_receiver(peppol_recipient, test_environment=True, timeout=20
162162 """
163163 try :
164164 service_urls = get_service_urls_for_participant_from_smp (peppol_recipient , test_environment , timeout , user_agent )
165- except ( ConnectionError , requests .exceptions .RequestException ) as e :
165+ except requests .exceptions .RequestException as e :
166166 if ignore_registry_communication_errors :
167167 return None
168168 else :
0 commit comments