diff options
author | Aaron Morris <aaorris@live.com> | 2017-10-01 09:16:17 -0700 |
---|---|---|
committer | Omer Katz <omer.drow@gmail.com> | 2017-10-01 19:16:17 +0300 |
commit | d782a0f7cdc46515301b38e65d255de5ae55e9c2 (patch) | |
tree | 6fa68ec3b0d7896342b72b8170eea3fc335b9058 /kombu/utils | |
parent | 572a4c02ba22349881a12251a5578bdb1e4c673e (diff) | |
download | kombu-d782a0f7cdc46515301b38e65d255de5ae55e9c2.tar.gz |
Update json utils. (#804)
Some environments bundle versions of simplejson that do not have
JSONDecodeError. Handle ImportErrors in these cases.
Diffstat (limited to 'kombu/utils')
-rw-r--r-- | kombu/utils/json.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kombu/utils/json.py b/kombu/utils/json.py index d824d0ef..3f9f194f 100644 --- a/kombu/utils/json.py +++ b/kombu/utils/json.py @@ -18,6 +18,7 @@ except ImportError: # pragma: no cover try: import simplejson as json + from simplejson.decoder import JSONDecodeError as _DecodeError _json_extra_kwargs = {'use_decimal': False} except ImportError: # pragma: no cover import json # noqa @@ -25,8 +26,6 @@ except ImportError: # pragma: no cover class _DecodeError(Exception): # noqa pass -else: - from simplejson.decoder import JSONDecodeError as _DecodeError IS_PY3 = sys.version_info[0] == 3 |