From: Joshua Date: Mon, 30 Nov 2009 00:21:40 +0000 (-0600) Subject: Try using simplejson first, and if not found then try using built-in json module. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b4e6b0292d17b42c3ac2c07a99812d1dbb34d7fc;p=tweepy.git Try using simplejson first, and if not found then try using built-in json module. --- diff --git a/tweepy/binder.py b/tweepy/binder.py index 8858ad1..339a835 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -10,13 +10,13 @@ from tweepy.parsers import parse_error from tweepy.error import TweepError try: - import json #Python >= 2.6 + import simplejson as json except ImportError: try: - import simplejson as json #Python < 2.6 + import json # Python 2.6+ except ImportError: try: - from django.utils import simplejson as json #Google App Engine + from django.utils import simplejson as json # Google App Engine except ImportError: raise ImportError, "Can't load a json library" diff --git a/tweepy/streaming.py b/tweepy/streaming.py index ddb72ea..de5e818 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -14,13 +14,13 @@ from tweepy.api import API from tweepy.error import TweepError try: - import json #Python >= 2.6 + import simplejson as json except ImportError: try: - import simplejson as json #Python < 2.6 + import json # Python 2.6+ except ImportError: try: - from django.utils import simplejson as json #Google App Engine + from django.utils import simplejson as json # Google App Engine except ImportError: raise ImportError, "Can't load a json library"