Fix up integer type detection on python3 (#25985)
This commit is contained in:
parent
921bc0599b
commit
de4a8b83df
1 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ EXAMPLES:
|
|||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
from __future__ import unicode_literals
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.six import string_types, integer_types
|
||||
import datetime
|
||||
|
||||
__metaclass__ = type
|
||||
|
@ -139,7 +139,7 @@ class LookupModule(LookupBase):
|
|||
def convert_mongo_result_to_valid_json(self, result):
|
||||
if result is None:
|
||||
return result
|
||||
if isinstance(result, (int, long, float, bool)):
|
||||
if isinstance(result, integer_types + (float, bool)):
|
||||
return result
|
||||
if isinstance(result, string_types):
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue