Mercurial > public > mercurial-scm > hg-stable
diff tests/run-tests.py @ 23263:dd51abf0aa17
run-tests: use a try/except ladder instead of looking for a specific version
This ensures we get json instead of simplejson in as many places as possible.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 10 Nov 2014 13:20:56 -0500 |
parents | e53f6b72a0e4 |
children | 49cdf51cbc6c |
line wrap: on
line diff
--- a/tests/run-tests.py Mon Nov 10 13:27:25 2014 -0500 +++ b/tests/run-tests.py Mon Nov 10 13:20:56 2014 -0500 @@ -61,12 +61,12 @@ import unittest try: - if sys.version_info < (2, 7): + import json +except ImportError: + try: import simplejson as json - else: - import json -except ImportError: - json = None + except ImportError: + json = None processlock = threading.Lock()