From b7190544245d58c9c0163a5f37a387be3b2c453f Mon Sep 17 00:00:00 2001 From: Ian Langworth Date: Sat, 20 Feb 2010 20:09:59 -0800 Subject: [PATCH] Applied skwslide's python-json patch From http://code.google.com/p/pyfacebook/issues/detail?id=104 --- facebook/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/facebook/__init__.py b/facebook/__init__.py index 0c41d02..ac65c38 100644 --- a/facebook/__init__.py +++ b/facebook/__init__.py @@ -62,13 +62,16 @@ RESPONSE_FORMAT = 'JSON' try: import json as simplejson -except ImportError: + simplejson.loads +except (ImportError, AttributeError): try: import simplejson - except ImportError: + simplejson.loads + except (ImportError, AttributeError): try: from django.utils import simplejson - except ImportError: + simplejson.loads + except (ImportError, AttributeError): try: import jsonlib as simplejson simplejson.loads