diff options
author | Bob Halley <halley@dnspython.org> | 2022-12-23 09:24:21 -0800 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2022-12-23 09:24:21 -0800 |
commit | f203c480db9493439e2a00f954f2cd209b601813 (patch) | |
tree | 3cdfe3c255949637b32b9f39f530153f9e988af9 | |
parent | e29b9e8f68fc6f5ccc16bea9f833573ea24549c6 (diff) | |
download | dnspython-f203c480db9493439e2a00f954f2cd209b601813.tar.gz |
lint
-rw-r--r-- | dns/dnssec.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dns/dnssec.py b/dns/dnssec.py index d380ea1..5dc2622 100644 --- a/dns/dnssec.py +++ b/dns/dnssec.py @@ -195,7 +195,8 @@ def make_ds( *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 @@ -268,7 +269,8 @@ def make_cds( *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 @@ -1115,7 +1117,7 @@ def make_ds_rdataset( 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) |