From 4ebd763de09f8b26848b781756e651943ff6a341 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 22 Dec 2016 19:56:46 +0000 Subject: [PATCH] py3 compatibility fix reported on #17038 (#19569) Signed-off-by: Sorin Sbarnea --- lib/ansible/plugins/filter/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/filter/core.py b/lib/ansible/plugins/filter/core.py index 804de360c9..2666e2808c 100644 --- a/lib/ansible/plugins/filter/core.py +++ b/lib/ansible/plugins/filter/core.py @@ -45,7 +45,7 @@ except: HAS_PASSLIB = False from ansible import errors -from ansible.compat.six import iteritems, string_types +from ansible.compat.six import iteritems, string_types, integer_types from ansible.compat.six.moves import reduce from ansible.compat.six.moves import shlex_quote from ansible.module_utils._text import to_text @@ -204,7 +204,7 @@ def rand(environment, end, start=None, step=None, seed=None): r = SystemRandom() else: r = Random(seed) - if isinstance(end, (int, long)): + if isinstance(end, integer_types): if not start: start = 0 if not step: