From ffec2a19aec2036ac4b3f0c68e5f278ad5bebced Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 4 Feb 2015 10:55:45 -0500 Subject: [PATCH] Some slight improvements in ansible version detection in tower where that's used --- awx/main/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/main/utils.py b/awx/main/utils.py index b5754de8bd..07aa16213d 100644 --- a/awx/main/utils.py +++ b/awx/main/utils.py @@ -98,8 +98,8 @@ def get_ansible_version(): proc = subprocess.Popen(['ansible', '--version'], stdout=subprocess.PIPE) result = proc.communicate()[0] - stripped_result = result.lower().replace('ansible', '').strip() - return stripped_result.split('\n', 1)[0] + stripped_result = result.lower().replace('ansible', '').strip().split(" ")[0] + return stripped_result except: return 'unknown'