aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJán Jančár2023-10-24 10:54:59 +0200
committerGitHub2023-10-24 10:54:59 +0200
commited6f324b3fcf85de24d93d293e75309e867b1166 (patch)
treeea4d487677e47118f58968fe4c6243a77dc628fd
parentecc28f731f6183e24b6625735abf145679310a9e (diff)
parent0b7439820649478bb02dc54c531eca1d56f6fbfb (diff)
downloadsec-certs-ed6f324b3fcf85de24d93d293e75309e867b1166.tar.gz
sec-certs-ed6f324b3fcf85de24d93d293e75309e867b1166.tar.zst
sec-certs-ed6f324b3fcf85de24d93d293e75309e867b1166.zip
Merge pull request #371 from crocs-muni/feat/try-schemes
Wrap CC scheme download in try-except and continue on fail.
-rw-r--r--src/sec_certs/dataset/cc_scheme.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sec_certs/dataset/cc_scheme.py b/src/sec_certs/dataset/cc_scheme.py
index 0625b257..a2550014 100644
--- a/src/sec_certs/dataset/cc_scheme.py
+++ b/src/sec_certs/dataset/cc_scheme.py
@@ -54,5 +54,8 @@ class CCSchemeDataset(JSONPathDataset, ComplexSerializableType):
for scheme, sources in CCScheme.methods.items():
if only_schemes is not None and scheme not in only_schemes:
continue
- schemes[scheme] = CCScheme.from_web(scheme, sources.keys())
+ try:
+ schemes[scheme] = CCScheme.from_web(scheme, sources.keys())
+ except Exception as e:
+ logger.warning(f"Could not download CC scheme: {scheme} due to error {e}.")
return cls(schemes)