From d6af6f8477d3d1600f3907d4ec1b216c94e67d52 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 11 Jan 2016 12:47:21 -0800 Subject: Update for modules which import json. Some do not use the json module directly so don't need import json. Some needed to fallback to simplejson with no traceback if neither was installed Fixes #1298 --- web_infrastructure/jira.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'web_infrastructure') diff --git a/web_infrastructure/jira.py b/web_infrastructure/jira.py index 79cfb72d..dded069f 100644 --- a/web_infrastructure/jira.py +++ b/web_infrastructure/jira.py @@ -160,7 +160,15 @@ EXAMPLES = """ issue={{issue.meta.key}} operation=transition status="Done" """ -import json +try: + import json +except ImportError: + try: + import simplejson as json + except ImportError: + # Let snippet from module_utils/basic.py return a proper error in this case + pass + import base64 def request(url, user, passwd, data=None, method=None): -- cgit v1.2.1