remove types module

This commit is contained in:
Tomas Kopecek 2017-03-07 14:39:42 +01:00 committed by Mike McLean
parent cf214de792
commit ed86da02dc
2 changed files with 4 additions and 4 deletions

View file

@ -5459,7 +5459,7 @@ def add_external_rpm(rpminfo, external_repo, strict=True):
('name', basestring),
('version', basestring),
('release', basestring),
('epoch', (int, types.NoneType)),
('epoch', (int, type(None))),
('arch', basestring),
('payloadhash', str),
('size', int),
@ -10229,7 +10229,7 @@ class RootExports(object):
if f in opts:
if opts[f] is None:
conditions.append('%s IS NULL' % f)
elif isinstance(opts[f], types.ListType):
elif isinstance(opts[f], list):
conditions.append('%s IN %%(%s)s' % (f, f))
else:
conditions.append('%s = %%(%s)i' % (f, f))
@ -10237,7 +10237,7 @@ class RootExports(object):
if ('not_' + f) in opts:
if opts['not_' + f] is None:
conditions.append('%s IS NOT NULL' % f)
elif isinstance(opts['not_' + f], types.ListType):
elif isinstance(opts['not_' + f], list):
conditions.append('%s NOT IN %%(not_%s)s' % (f, f))
else:
conditions.append('%s != %%(not_%s)i' % (f, f))

View file

@ -110,7 +110,7 @@ class HandlerRegistry(object):
Handlers are functions marked with one of the decorators defined in koji.plugin
"""
for v in vars(plugin).itervalues():
if isinstance(v, (types.ClassType, types.TypeType)):
if isinstance(v, type):
#skip classes
continue
if callable(v):