The request method of Session class does not take a session argument. But api.request does. So, it has to be popped before you can send the whole kwargs dict to Session.request method.

This commit is contained in:
Shrikant Sharat Kandula
2012-01-09 11:16:54 +05:30
parent 89c90add2c
commit 53d679edba
+1 -1
View File
@@ -34,7 +34,7 @@ def request(method, url, **kwargs):
:param verify: (optional) if ``True``, the SSL cert will be verified. A CA_BUNDLE path can also be provided.
"""
s = kwargs.get('session') or sessions.session()
s = kwargs.pop('session') if 'session' in kwargs else sessions.session()
return s.request(method=method, url=url, **kwargs)