From 869e2abf99e56bb67adfda3b13330807743d7480 Mon Sep 17 00:00:00 2001 From: David Medina Date: Sun, 12 Feb 2012 12:44:06 +0100 Subject: Support to map `self` in resources. Very nested resources like Repo --- pygithub3/resources/base.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pygithub3/resources/base.py') diff --git a/pygithub3/resources/base.py b/pygithub3/resources/base.py index dfa285f..183c9eb 100644 --- a/pygithub3/resources/base.py +++ b/pygithub3/resources/base.py @@ -48,6 +48,8 @@ class Resource(object): return date def parse_map(resource, raw_resource): + if resource == 'self': + return self.__load(raw_resource) if hasattr(raw_resource, 'items'): return resource.__load(raw_resource) -- cgit v1.2.3-59-g8ed1b