diff options
author | Stanislav Laznicka <slaznick@redhat.com> | 2016-02-02 12:50:26 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-02-24 09:21:30 +0100 |
commit | 9757384c7c6337138b6e096d3bb926cdb3012ff6 (patch) | |
tree | 0e5404fa472a1904b7eeaebabfc5620fdce0d2fd /ipatests/test_xmlrpc | |
parent | 0accf8ccb64963954dbe7c137d23f52e5901ac4f (diff) | |
download | freeipa-9757384c7c6337138b6e096d3bb926cdb3012ff6.tar.gz freeipa-9757384c7c6337138b6e096d3bb926cdb3012ff6.tar.xz freeipa-9757384c7c6337138b6e096d3bb926cdb3012ff6.zip |
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 <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipatests/test_xmlrpc')
-rw-r--r-- | ipatests/test_xmlrpc/test_automount_plugin.py | 2 | ||||
-rw-r--r-- | ipatests/test_xmlrpc/xmlrpc_test.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/ipatests/test_xmlrpc/test_automount_plugin.py b/ipatests/test_xmlrpc/test_automount_plugin.py index 974a0f1f7..6694bf07c 100644 --- a/ipatests/test_xmlrpc/test_automount_plugin.py +++ b/ipatests/test_xmlrpc/test_automount_plugin.py @@ -87,6 +87,8 @@ class AutomountTest(XMLRPC_test): break else: current_file.write(line + '\n') + assert current_file is not None, ('The input file does not contain any' + 'records of files to be opened.') current_file.close() self.failsafe_add(api.Object.automountlocation, self.locname) diff --git a/ipatests/test_xmlrpc/xmlrpc_test.py b/ipatests/test_xmlrpc/xmlrpc_test.py index 8140364a5..687958d69 100644 --- a/ipatests/test_xmlrpc/xmlrpc_test.py +++ b/ipatests/test_xmlrpc/xmlrpc_test.py @@ -357,7 +357,7 @@ class Declarative(XMLRPC_test): if not expected(e, output): raise AssertionError( UNEXPECTED % (cmd, name, args, options, - e.__class__.__name__, e) + type(e).__name__, e) ) def check_output(self, nice, cmd, args, options, expected, extra_check): |