projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
808b0ad
)
Add try/catch for simplejson vs json
author
Zach Williams
<hey@zachwill.com>
Sun, 8 Jul 2012 04:14:29 +0000
(21:14 -0700)
committer
Zach Williams
<hey@zachwill.com>
Sun, 8 Jul 2012 04:14:29 +0000
(21:14 -0700)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index 7eb3efe7d6919271820c15fdf9e830a6ba249087..40187244cc43bb2c788b6cb30682490da0535a85 100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-7,10
+7,14
@@
requests.models
This module contains the primary objects that power Requests.
"""
-import json
import os
from datetime import datetime
+try:
+ import simplejson as json
+except ImportError:
+ import json
+
from .hooks import dispatch_hook, HOOKS
from .structures import CaseInsensitiveDict
from .status_codes import codes