From 69fd3cc7dbf728dba61c98b59e546b2f88e19a03 Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Fri, 4 Sep 2009 00:36:36 -0400 Subject: [PATCH] Check for whether or not we can load simplejson from django.utils as a last ditch effort in import statements --- twython.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/twython.py b/twython.py index 5c4a6b8..5afadf0 100644 --- a/twython.py +++ b/twython.py @@ -25,8 +25,11 @@ try: except ImportError: try: import json as simplejson - except: - raise Exception("Twython requires the simplejson library (or Python 2.6) to work. http://www.undefined.org/python/") + except ImportError: + 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: import oauth