aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/services/base.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-05-27 21:39:03 +0200
committerDavid Medina <davidmedina9@gmail.com>2012-05-27 21:39:31 +0200
commitac2b75a6527e8ce916b7675dac247d37276a3aa2 (patch)
tree4a3ead072bcdee6f17fdac88e836f30ad435fd7f /pygithub3/services/base.py
parentMerge pull request #11 from dsc/patch-1 (diff)
parentAuthors updated (diff)
downloadpython-github3-ac2b75a6527e8ce916b7675dac247d37276a3aa2.tar.xz
python-github3-ac2b75a6527e8ce916b7675dac247d37276a3aa2.zip
Merge 'services/orgs'
Diffstat (limited to 'pygithub3/services/base.py')
-rw-r--r--pygithub3/services/base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pygithub3/services/base.py b/pygithub3/services/base.py
index 1059371..649b2b3 100644
--- a/pygithub3/services/base.py
+++ b/pygithub3/services/base.py
@@ -111,10 +111,10 @@ class Service(object):
def _put(self, request, **kwargs):
""" Bug in Github API? requests library?
- I must send data as empty string when the specifications' of some PUT
- request are 'Not send input data'. If I don't do that and send data as
- None, the requests library doesn't send 'Content-length' header and the
- server returns 411 - Required Content length (at least 0)
+ I must send data when the specifications' of some PUT request are 'Not
+ send input data'. If I don't do that and send data as None, the
+ requests library doesn't send 'Content-length' header and the server
+ returns 411 - Required Content length (at least 0)
For instance:
- follow-user request doesn't send input data
@@ -125,7 +125,7 @@ class Service(object):
Related: https://github.com/github/developer.github.com/pull/52
"""
- input_data = request.get_body() or ''
+ input_data = request.get_body() or 'PLACEHOLDER'
response = self._client.put(request, data=input_data, **kwargs)
if response.status_code != 204: # != NO_CONTENT
return request.resource.loads(response.content)