Commit 5fd807ac by Michael DeHaan

Merge pull request #2262 from bcoca/json_nice_error

now ansible shows nice message about missing json instead of traceback
parents 125015ea 46c913f7
......@@ -51,11 +51,6 @@ BOOLEANS = BOOLEANS_TRUE + BOOLEANS_FALSE
# of an ansible module. The source of this common code lives
# in lib/ansible/module_common.py
try:
import json
except ImportError:
import simplejson as json
import base64
import os
import re
import shlex
......@@ -72,6 +67,15 @@ import pwd
import platform
import errno
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
sys.stderr.write('Error: ansible requires a json module, none found!')
sys.exit(1)
HAVE_SELINUX=False
try:
import selinux
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment