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,6 +25,9 @@ try:
except ImportError: except ImportError:
try: try:
import json as simplejson import json as simplejson
except ImportError:
try:
from django.utils import simplejson
except: except:
raise Exception("Twython requires the simplejson library (or Python 2.6) to work. http://www.undefined.org/python/") raise Exception("Twython requires the simplejson library (or Python 2.6) to work. http://www.undefined.org/python/")