From ed86da02dc1baa69710fedcfeb6373cd26cf155b Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Tue, 7 Mar 2017 14:39:42 +0100 Subject: [PATCH] remove types module --- hub/kojihub.py | 6 +++--- hub/kojixmlrpc.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hub/kojihub.py b/hub/kojihub.py index 0cde1265..84a9d493 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -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)) diff --git a/hub/kojixmlrpc.py b/hub/kojixmlrpc.py index 3515bd11..6ea6dc08 100644 --- a/hub/kojixmlrpc.py +++ b/hub/kojixmlrpc.py @@ -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):