diff options
| author | J08nY | 2024-08-13 11:56:39 +0200 |
|---|---|---|
| committer | J08nY | 2024-08-13 11:56:39 +0200 |
| commit | 31b5c268132994beb277af8ffd21b6cbad3b51da (patch) | |
| tree | bcf69bff08456076772e1f80e70762217650b879 | |
| parent | 9b30af76de0311be2e5f6ba8ffb0510c3c2406c2 (diff) | |
| download | sec-certs-31b5c268132994beb277af8ffd21b6cbad3b51da.tar.gz sec-certs-31b5c268132994beb277af8ffd21b6cbad3b51da.tar.zst sec-certs-31b5c268132994beb277af8ffd21b6cbad3b51da.zip | |
Prefer links from HTML in CC.
| -rw-r--r-- | src/sec_certs/sample/cc.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/sec_certs/sample/cc.py b/src/sec_certs/sample/cc.py index 5354ab3b..d4bc73ae 100644 --- a/src/sec_certs/sample/cc.py +++ b/src/sec_certs/sample/cc.py @@ -551,13 +551,12 @@ class CCCertificate( f"Attempting to merge divergent certificates: self[dgst]={self.dgst}, other[dgst]={other.dgst}" ) + # Prefer some values from the HTML + # Links in CSV are currently (13.08.2024) broken. + html_preferred_attrs = {"protection_profiles", "maintenance_updates", "cert_link", "report_link", "st_link"} + for att, val in vars(self).items(): - if ( - (not val) - or (other_source == "html" and att == "protection_profiles") - or (other_source == "html" and att == "maintenance_updates") - or (att == "state") - ): + if (not val) or (other_source == "html" and att in html_preferred_attrs) or (att == "state"): setattr(self, att, getattr(other, att)) else: if getattr(self, att) != getattr(other, att): |
