From 9757384c7c6337138b6e096d3bb926cdb3012ff6 Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka Date: Tue, 2 Feb 2016 12:50:26 +0100 Subject: Cosmetic changes to the code Fixes some Coverity issues ipadiscovery.py: added assert should universe break plugins/dns.py: removed dead code dnssec/ldapkeydb.py: attribute assert in the proper object test_automount_plugin.py: fixed possible close() on None xmlrpc_test.py: Coverity does not like accessing None.__class__ https://fedorahosted.org/freeipa/ticket/5661 Reviewed-By: Jan Cholasta Reviewed-By: Martin Basti --- ipapython/dnssec/ldapkeydb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipapython') diff --git a/ipapython/dnssec/ldapkeydb.py b/ipapython/dnssec/ldapkeydb.py index 55c09c040..aa0413934 100644 --- a/ipapython/dnssec/ldapkeydb.py +++ b/ipapython/dnssec/ldapkeydb.py @@ -288,7 +288,7 @@ class LdapKeyDB(AbstractHSM): for attr in default_attrs: key.setdefault(attr, default_attrs[attr]) - assert 'ipk11id' in o, 'key is missing ipk11Id in %s' % key.entry.dn + assert 'ipk11id' in key, 'key is missing ipk11Id in %s' % key.entry.dn key_id = key['ipk11id'] assert key_id not in keys, 'duplicate ipk11Id=0x%s in "%s" and "%s"' % (hexlify(key_id), key.entry.dn, keys[key_id].entry.dn) assert 'ipk11label' in key, 'key "%s" is missing ipk11Label' % key.entry.dn -- cgit