From e27eb73cba96deecc2264bfb5ac36cffe761e888 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Mon, 29 Feb 2016 09:05:48 -0600 Subject: [PATCH] sys.subversion unavailable in py24. Fixes #14704 --- lib/ansible/module_utils/facts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 23007e1689..974d47a55d 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -808,9 +808,12 @@ class Facts(object): }, 'version_info': list(sys.version_info), 'executable': sys.executable, - 'type': sys.subversion[0], 'has_sslcontext': HAS_SSLCONTEXT } + try: + self.facts['python']['type'] = sys.subversion[0] + except AttributeError: + self.facts['python']['type'] = None class Hardware(Facts):