From: Thomas Bohmbach, Jr Date: Mon, 14 Sep 2009 19:13:41 +0000 (-0500) Subject: Changed json import to work on Google App Engine X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1c5c00a2a1bd44c31b8d5a1e14cd60f823daff72;p=tweepy.git Changed json import to work on Google App Engine --- diff --git a/tweepy/parsers.py b/tweepy/parsers.py index 2731e9e..00a7bf6 100644 --- a/tweepy/parsers.py +++ b/tweepy/parsers.py @@ -7,9 +7,15 @@ from datetime import datetime from . models import models try: - import json + import json #Python >= 2.6 except ImportError: - import simplejson as json + try: + import simplejson as json #Python < 2.6 + except ImportError: + try: + from django.utils import simplejson as json #Google App Engine + except ImportError: + raise ImportError, "Can't load a json library" def parse_json(data, api):