The method param in httplib2 is not positional. (issue 8522043)

2 views
Skip to first unread message

jcgre...@google.com

unread,
Apr 18, 2013, 8:47:45 PM4/18/13
to dhe...@google.com, google-api-p...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: dhermes,

Description:
The method param in httplib2 is not positional.

Please review this at https://codereview.appspot.com/8522043/

Affected files:
M apiclient/http.py


Index: apiclient/http.py
===================================================================
--- a/apiclient/http.py
+++ b/apiclient/http.py
@@ -738,7 +738,7 @@
start_headers['X-Upload-Content-Length'] = size
start_headers['content-length'] = str(self.body_size)

- resp, content = http.request(self.uri, self.method,
+ resp, content = http.request(self.uri, method=self.method,
body=self.body,
headers=start_headers)
if resp.status == 200 and 'location' in resp:
@@ -793,7 +793,7 @@
'Content-Length': str(chunk_end - self.resumable_progress + 1)
}
try:
- resp, content = http.request(self.resumable_uri, 'PUT',
+ resp, content = http.request(self.resumable_uri, method='PUT',
body=data,
headers=headers)
except:
@@ -1162,7 +1162,7 @@
headers['content-type'] = ('multipart/mixed; '
'boundary="%s"') % message.get_boundary()

- resp, content = http.request(self._batch_uri, 'POST', body=body,
+ resp, content = http.request(self._batch_uri, method='POST', body=body,
headers=headers)

if resp.status >= 300:


dhe...@google.com

unread,
Apr 19, 2013, 12:44:06 AM4/19/13
to jcgre...@google.com, google-api-p...@googlegroups.com, re...@codereview-hr.appspotmail.com
LGTM

How do you know this is comprehensive?

Can I "review" the search path/script you took?

https://codereview.appspot.com/8522043/
Reply all
Reply to author
Forward
0 new messages