mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
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:
parent
2744fde7c9
commit
06e1141106
7 changed files with 17 additions and 17 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue