From 5b56faeed2a55af1841b032358e6e82f2b761394 Mon Sep 17 00:00:00 2001 From: Stein Inge Morisbak Date: Tue, 9 Dec 2014 13:14:50 +0100 Subject: [PATCH] Fall back to simplejson if ImportError on json --- lib/ansible/modules/extras/monitoring/pagerduty.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/monitoring/pagerduty.py b/lib/ansible/modules/extras/monitoring/pagerduty.py index 5ca33717dc9..42101bae1e9 100644 --- a/lib/ansible/modules/extras/monitoring/pagerduty.py +++ b/lib/ansible/modules/extras/monitoring/pagerduty.py @@ -131,9 +131,12 @@ EXAMPLES=''' desc=deployment ''' -import json import datetime import base64 +try: + import json +except ImportError: + import simplejson as json def auth_header(user, passwd, token): if token: