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
parent 2744fde7c9
commit 06e1141106
7 changed files with 17 additions and 17 deletions

View file

@ -143,7 +143,7 @@ def _run_module(wrapped_cmd, jid, job_path):
if json_warnings:
# merge JSON junk warnings with any existing module warnings
module_warnings = result.get('warnings', [])
if type(module_warnings) is not list:
if not isinstance(module_warnings, list):
module_warnings = [module_warnings]
module_warnings.extend(json_warnings)
result['warnings'] = module_warnings