From 95a977cfc948cbe528f5dea29cd6fcca1f504b11 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 11 Mar 2013 15:10:49 -0400 Subject: [PATCH] now cleanly catches traceback that occurs when running newer simplejson with older python interpreter. Signed-off-by: Brian Coca --- lib/ansible/module_common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py index 825a3bcf65e..453690d48ec 100644 --- a/lib/ansible/module_common.py +++ b/lib/ansible/module_common.py @@ -75,6 +75,9 @@ except ImportError: except ImportError: sys.stderr.write('Error: ansible requires a json module, none found!') sys.exit(1) + except SyntaxError: + sys.stderr.write('SyntaxError: probably due to json and python being for different versions') + sys.exit(1) HAVE_SELINUX=False try: