From e3c05fcb73c5a1081167d73278785bf18d652dab Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 17 Sep 2015 17:56:45 +0200 Subject: 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 Reviewed-By: Jan Cholasta Reviewed-By: Martin Basti --- ipalib/plugins/hbactest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ipalib/plugins/hbactest.py') 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']), ) -- cgit