diff options
author | 2012-02-12 12:44:06 +0100 | |
---|---|---|
committer | 2012-02-12 12:44:06 +0100 | |
commit | 869e2abf99e56bb67adfda3b13330807743d7480 (patch) | |
tree | cd62b5942d8f04846b182a51bfcc17430d9cdebb /pygithub3/resources/base.py | |
parent | Update readme (diff) | |
download | python-github3-869e2abf99e56bb67adfda3b13330807743d7480.tar.xz python-github3-869e2abf99e56bb67adfda3b13330807743d7480.zip |
Support to map `self` in resources.
Very nested resources like Repo
Diffstat (limited to 'pygithub3/resources/base.py')
-rw-r--r-- | pygithub3/resources/base.py | 2 |
1 files changed, 2 insertions, 0 deletions
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) |