From b818dcc8639ca1cbcf8144c04f937ba19f8fa6cf Mon Sep 17 00:00:00 2001 From: David Medina Date: Thu, 9 Feb 2012 23:10:07 +0100 Subject: Easier requests.Factory builds --- pygithub3/requests/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pygithub3') diff --git a/pygithub3/requests/__init__.py b/pygithub3/requests/__init__.py index 79f9cb9..2209fc5 100644 --- a/pygithub3/requests/__init__.py +++ b/pygithub3/requests/__init__.py @@ -42,10 +42,10 @@ class Request(object): resource = Raw body_schema = () - def __init__(self, args): + def __init__(self, **kwargs): """ """ - self.body = args.pop('body', None) - self.args = args + self.body = kwargs.pop('body', None) + self.args = kwargs self.clean() def clean(self): @@ -114,6 +114,6 @@ class Factory(object): @__validate @__dispatch def __call__(self, request='', **kwargs): - request = request(kwargs) + request = request(**kwargs) assert isinstance(request, Request) return request -- cgit v1.2.3-59-g8ed1b