Merge pull request #344 from sharat87/patch-1

Do not pass over the `session` argument to `Session.request` method
This commit is contained in:
Kenneth Reitz
2012-01-10 11:11:01 -08:00
+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)