From b4e6b0292d17b42c3ac2c07a99812d1dbb34d7fc Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 29 Nov 2009 18:21:40 -0600 Subject: [PATCH] Try using simplejson first, and if not found then try using built-in json module. --- tweepy/binder.py | 6 +++--- tweepy/streaming.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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" -- 2.25.1