From 08a3ea22210f17731ea94c077625cc9bb85dd45b Mon Sep 17 00:00:00 2001 From: jctanner Date: Wed, 3 May 2017 21:31:57 -0400 Subject: [PATCH] sysctl: switch basestring to string_types (#24277) --- lib/ansible/modules/system/sysctl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/sysctl.py b/lib/ansible/modules/system/sysctl.py index 7d89cbd21d..98826c5eb3 100644 --- a/lib/ansible/modules/system/sysctl.py +++ b/lib/ansible/modules/system/sysctl.py @@ -119,6 +119,7 @@ EXAMPLES = ''' import os import tempfile from ansible.module_utils.basic import get_platform, get_exception, AnsibleModule, BOOLEANS_TRUE, BOOLEANS_FALSE +from ansible.module_utils.six import string_types class SysctlModule(object): @@ -216,7 +217,7 @@ class SysctlModule(object): return '1' else: return '0' - elif isinstance(value, basestring): + elif isinstance(value, string_types): if value.lower() in BOOLEANS_TRUE: return '1' elif value.lower() in BOOLEANS_FALSE: