summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/hbactest.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-09-17 17:56:45 +0200
committerJan Cholasta <jcholast@redhat.com>2015-10-07 10:27:20 +0200
commite3c05fcb73c5a1081167d73278785bf18d652dab (patch)
tree2e812fea2e20b5808371975da090a829dd5c66f3 /ipalib/plugins/hbactest.py
parent65e3b9edc66d7dfe885df143c16a59588af8192f (diff)
downloadfreeipa-e3c05fcb73c5a1081167d73278785bf18d652dab.tar.gz
freeipa-e3c05fcb73c5a1081167d73278785bf18d652dab.tar.xz
freeipa-e3c05fcb73c5a1081167d73278785bf18d652dab.zip
Remove uses of the `types` module
In Python 3, the types module no longer provide alternate names for built-in types, e.g. `types.StringType` can just be spelled `str`. NoneType is also removed; it needs to be replaced with type(None) Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipalib/plugins/hbactest.py')
-rw-r--r--ipalib/plugins/hbactest.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/ipalib/plugins/hbactest.py b/ipalib/plugins/hbactest.py
index b528707f7..5999b6bf5 100644
--- a/ipalib/plugins/hbactest.py
+++ b/ipalib/plugins/hbactest.py
@@ -19,7 +19,6 @@
from ipalib import api, errors, output, util
from ipalib import Command, Str, Flag, Int, DeprecatedParam
-from types import NoneType
from ipalib.cli import to_cli
from ipalib import _, ngettext
from ipapython.dn import DN
@@ -250,10 +249,10 @@ class hbactest(Command):
has_output = (
output.summary,
- output.Output('warning', (list, tuple, NoneType), _('Warning')),
- output.Output('matched', (list, tuple, NoneType), _('Matched rules')),
- output.Output('notmatched', (list, tuple, NoneType), _('Not matched rules')),
- output.Output('error', (list, tuple, NoneType), _('Non-existent or invalid rules')),
+ output.Output('warning', (list, tuple, type(None)), _('Warning')),
+ output.Output('matched', (list, tuple, type(None)), _('Matched rules')),
+ output.Output('notmatched', (list, tuple, type(None)), _('Not matched rules')),
+ output.Output('error', (list, tuple, type(None)), _('Non-existent or invalid rules')),
output.Output('value', bool, _('Result of simulation'), ['no_display']),
)