diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-09-17 17:56:45 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-10-07 10:27:20 +0200 |
commit | e3c05fcb73c5a1081167d73278785bf18d652dab (patch) | |
tree | 2e812fea2e20b5808371975da090a829dd5c66f3 /ipalib/output.py | |
parent | 65e3b9edc66d7dfe885df143c16a59588af8192f (diff) | |
download | freeipa-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/output.py')
-rw-r--r-- | ipalib/output.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ipalib/output.py b/ipalib/output.py index 1398a6cb8..5eb8b6b8e 100644 --- a/ipalib/output.py +++ b/ipalib/output.py @@ -22,7 +22,6 @@ Simple description of return values. """ from inspect import getdoc -from types import NoneType import six @@ -120,7 +119,7 @@ class PrimaryKey(Output): types = cmd.obj.primary_key.allowed_types else: types = (unicode,) - types = types + (NoneType,) + types = types + (type(None),) else: types = (unicode,) if not isinstance(value, types): @@ -157,7 +156,7 @@ class ListOfPrimaryKeys(Output): result = Output('result', doc=_('All commands should at least have a result')) -summary = Output('summary', (unicode, NoneType), +summary = Output('summary', (unicode, type(None)), _('User-friendly description of action performed') ) |