summaryrefslogtreecommitdiff
path: root/django/utils/simplejson/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/simplejson/__init__.py')
-rw-r--r--django/utils/simplejson/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/django/utils/simplejson/__init__.py b/django/utils/simplejson/__init__.py
index 2be6c3909c..9a8c5a348a 100644
--- a/django/utils/simplejson/__init__.py
+++ b/django/utils/simplejson/__init__.py
@@ -119,8 +119,14 @@ except ImportError:
if not use_system_version:
try:
from json import * # Python 2.6 preferred over local copy.
+
+ # There is a "json" package around that is not Python's "json", so we
+ # check for something that is only in the namespace of the version we
+ # want.
+ JSONDecoder
+
use_system_version = True
- except ImportError:
+ except (ImportError, NameError):
pass
# If all else fails, we have a bundled version that can be used.