Mercurial > hg
changeset 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 | 86a8658c77ff |
children | 3480c07fc934 |
files | tests/run-tests.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
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()