*name*, a ``dns.name.Name`` or ``str``, the owner name of the DS record.
- *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``, the key the DS is about.
+ *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``,
+ the key the DS is about.
*algorithm*, a ``str`` or ``int`` specifying the hash algorithm.
The currently supported hashes are "SHA1", "SHA256", and "SHA384". Case
*name*, a ``dns.name.Name`` or ``str``, the owner name of the DS record.
- *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``, key the DS is about.
+ *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``,
+ the key the DS is about.
*algorithm*, a ``str`` or ``int`` specifying the hash algorithm.
The currently supported hashes are "SHA1", "SHA256", and "SHA384". Case
for rdata in cds_rdataset_to_ds_rdataset(rdataset):
if rdata.digest_type in _algorithms:
res.append(rdata)
- if not len(res):
+ if len(res) == 0:
raise ValueError("no acceptable CDS rdata found")
return dns.rdataset.from_rdata_list(rdataset.ttl, res)