File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ def _timerange_valid_for_status(period: TimeRange | None, status: KeyStatus) ->
110110 return False
111111
112112 # If we want Expired keys, we don't care. Otherwise, check that we are within range.
113- return status == KeyStatus .Expired or (period .end is not None and now < period .end )
113+ return status == KeyStatus .Expired or (period .end is None or now < period .end )
114114
115115
116116class TrustUpdater :
@@ -318,13 +318,10 @@ def get_fulcio_certs(self) -> list[Certificate]:
318318 ]
319319 )
320320 else :
321- certs = [
322- load_pem_x509_certificate (c )
323- for c in self ._get (
324- KeyUsage .Fulcio , [KeyStatus .Active , KeyStatus .Expired ]
325- )
326- ]
327-
321+ certs = (
322+ self ._get (KeyUsage .Fulcio , [KeyStatus .Active , KeyStatus .Expired ]) or []
323+ )
324+ certs = [load_pem_x509_certificate (c ) for c in certs ]
328325 if not certs :
329326 raise MetadataError ("Fulcio certificates not found in TUF metadata" )
330327 return certs
You can’t perform that action at this time.
0 commit comments