summaryrefslogtreecommitdiffstats
path: root/setup.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 /setup.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 'setup.py')
-rwxr-xr-xsetup.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 434aeb8cc..330503d61 100755
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,6 @@ from distutils.core import setup
from distutils.command.install_data import install_data as _install_data
from distutils.util import change_root, convert_path
from distutils import log
-from types import StringType
import ipalib
import os
@@ -43,7 +42,7 @@ class install_data(_install_data):
# Now gzip them
for f in self.data_files:
- if type(f) is StringType:
+ if isinstance(f, str):
# it's a simple file
f = convert_path(f)
cmd = '/bin/gzip %s/%s' % (self.install_dir, f)