You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CRL get_revoked emits either a None or a Tuple depending on whether there are revoked certificates. This makes for awkward syntax by the caller:
_revoked: Optional[Tuple[Any]] = crl.get_revoked()
if _revoked is not None:
for cert in _revoked:
process_revoked_cert(cert)
vs:
for cert in crl.get_revoked():
process_revoked_cert(cert)
(ends in TypeError: 'NoneType' object is not iterable)
The perception of callers is that the latter is the supported way, so I'm encountering bugs because None is not guarded against. But None doesn't belong here, IMHO
The text was updated successfully, but these errors were encountered:
TL;DR: PR #859
CRL
get_revoked
emits either aNone
or aTuple
depending on whether there are revoked certificates. This makes for awkward syntax by the caller:vs:
(ends in
TypeError: 'NoneType' object is not iterable
)The perception of callers is that the latter is the supported way, so I'm encountering bugs because
None
is not guarded against. ButNone
doesn't belong here, IMHOThe text was updated successfully, but these errors were encountered: