replace type() with isinstance() (#5541)

Replace all use of type() with isintance()

Addresses https://github.com/ansible/ansible/issues/18310
This commit is contained in:
jctanner 2016-11-09 13:46:18 -05:00 committed by Matt Clay
commit 06e1141106
7 changed files with 17 additions and 17 deletions

View file

@ -602,7 +602,7 @@ class Wrapper(object):
raise AttributeError(name)
def _wrap(self, func, args, kwargs):
if type(func) == MethodType:
if isinstance(func, MethodType):
result = self._handle_temporary_redirects(lambda: func(*args, **kwargs))
else:
result = self._handle_temporary_redirects(lambda: func(self.other, *args, **kwargs))