Fix up integer type detection on python3 (#25985)

pull/26017/head
Kassian Sun 8 years ago committed by jctanner
parent 921bc0599b
commit de4a8b83df

@ -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…
Cancel
Save