From 2a3a0d60cd4c58f594bacb2a81e33a8900fc9700 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Thu, 23 Feb 2012 20:51:29 -0500 Subject: [PATCH] Fall back to standalone simplejson module CentOS5 has python 2.4 which doesn't have a built-in json module --- command | 5 ++++- ping | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/command b/command index 53a8d6ffff1..c11cfebd250 100755 --- a/command +++ b/command @@ -1,6 +1,9 @@ #!/usr/bin/python -import json +try: + import json +except ImportError: + import simplejson as json import subprocess import sys import datetime diff --git a/ping b/ping index fe0b3948255..e40be68a2fe 100644 --- a/ping +++ b/ping @@ -1,5 +1,8 @@ #!/usr/bin/python -import json +try: + import json +except ImportError: + import simplejson as json print json.dumps(1)