projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f54324c
)
Changed json import to work on Google App Engine
author
Thomas Bohmbach, Jr
<thomas@gumption.com>
Mon, 14 Sep 2009 19:13:41 +0000
(14:13 -0500)
committer
Thomas Bohmbach, Jr
<thomas@gumption.com>
Mon, 14 Sep 2009 19:13:41 +0000
(14:13 -0500)
tweepy/parsers.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/parsers.py
b/tweepy/parsers.py
index 2731e9e0c506b6cb0c960ef8d305d1117b55ebe0..00a7bf63f51533d2f0cf0e9ba964589166ae56ca 100644
(file)
--- 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):