File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 22import re
33from urllib .parse import urlparse
44
5+ import requests
6+
57from datahugger .config import RE3DATA_SOFTWARE
68from datahugger .config import SERVICES_NETLOC
79from datahugger .config import SERVICES_NETLOC_REGEXP
@@ -51,11 +53,15 @@ def _resolve_service_with_re3data(doi):
5153 return None
5254
5355 logging .info ("Resolve service with datacite and re3data" )
54- publisher = get_datapublisher_from_doi (doi )
56+ try :
57+ publisher = get_datapublisher_from_doi (doi )
58+ except requests .HTTPError :
59+ return None
5560 logging .info (f"Datacite publisher of dataset: { publisher } " )
5661
5762 if not publisher :
58- raise ValueError ("Can't resolve the publisher from the DOI." )
63+ logging .info ("Can't resolve the publisher from the DOI." )
64+ return None
5965
6066 data_repos = get_re3data_repositories ()
6167
You can’t perform that action at this time.
0 commit comments