Commit b4e6b029 authored by Joshua's avatar Joshua
Browse files

Try using simplejson first, and if not found then try using built-in json module.

parent 0b530bf4
......@@ -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"
......
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment