--- a/tests/hghave.py Wed Oct 15 12:39:19 2014 -0700
+++ b/tests/hghave.py Mon Nov 10 13:27:25 2014 -0500
@@ -289,14 +289,17 @@
@check("json", "some json module available")
def has_json():
try:
- if sys.version_info < (2, 7):
- import simplejson as json
- else:
- import json
+ import json
json.dumps
return True
except ImportError:
- return False
+ try:
+ import simplejson as json
+ json.dumps
+ return True
+ except ImportError:
+ pass
+ return False
@check("outer-repo", "outer repo")
def has_outer_repo():