Module: check_mk
Branch: master
Commit: 1ab801b344d4a44b10f4aac4213be3294341f7ec
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ab801b344d4a4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 16 16:09:07 2015 +0200
htmllib: made json import more portable
---
web/htdocs/htmllib.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 635b70e..add2ca0 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -45,7 +45,12 @@
# input to str or unicode must happen as early as possible,
# directly when reading from file or URL.
-import time, os, pwd, urllib, random, re, __builtin__, json
+import time, os, pwd, urllib, random, re, __builtin__
+
+try:
+ import simplejson as json
+except ImportError:
+ import json
from lib import *
# Python 2.3 does not have 'set' in normal namespace.