imported patch kwargs

This commit is contained in:
Joe Gregorio
2013-11-26 16:06:56 -05:00
parent b79c737dfe
commit d8cc45800f

View File

@@ -798,14 +798,18 @@ class OAuth2Decorator(object):
url = self.flow.step1_get_authorize_url()
return str(url)
def http(self):
def http(self, *args, **kwargs):
"""Returns an authorized http instance.
Must only be called from within an @oauth_required decorated method, or
from within an @oauth_aware decorated method where has_credentials()
returns True.
Args:
args: Positional arguments passed to httplib2.Http constructor.
kwargs: Positional arguments passed to httplib2.Http constructor.
"""
return self.credentials.authorize(httplib2.Http())
return self.credentials.authorize(httplib2.Http(*args, **kwargs))
@property
def callback_path(self):