Check for whether or not we can load simplejson from django.utils as a last ditch effort in import statements

This commit is contained in:
Ryan McGrath 2009-09-04 00:36:36 -04:00
parent 3369f7d81d
commit 69fd3cc7db

View file

@ -25,8 +25,11 @@ try:
except ImportError: except ImportError:
try: try:
import json as simplejson import json as simplejson
except: except ImportError:
raise Exception("Twython requires the simplejson library (or Python 2.6) to work. http://www.undefined.org/python/") try:
from django.utils import simplejson
except:
raise Exception("Twython requires the simplejson library (or Python 2.6) to work. http://www.undefined.org/python/")
try: try:
import oauth import oauth