summaryrefslogtreecommitdiff
path: root/requests/models.py
diff options
context:
space:
mode:
authorRavi Prakash Putchala <praks.putchala>2015-09-09 13:04:24 +0530
committerRavi Prakash Putchala <praks.putchala>2015-09-09 13:04:24 +0530
commit7a0cd16c1a5be16f3df395ee12ed11d0ddde7837 (patch)
tree7f22f2850ffc870e381b78d8ad69de7cd7b6a5b0 /requests/models.py
parent37037607b5f3da32ff1897caca3c38e210f04c37 (diff)
downloadpython-requests-7a0cd16c1a5be16f3df395ee12ed11d0ddde7837.tar.gz
changed the null check for 'data' parameter to be more explicit.
removed the superfluous encode from the testcase.
Diffstat (limited to 'requests/models.py')
-rw-r--r--requests/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/requests/models.py b/requests/models.py
index 9fa367d3..06e84362 100644
--- a/requests/models.py
+++ b/requests/models.py
@@ -414,7 +414,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
content_type = None
length = None
- if not data and json is not None:
+ if data == {} and json is not None:
content_type = 'application/json'
body = complexjson.dumps(json)