diff options
author | 2012-02-05 12:38:00 +0100 | |
---|---|---|
committer | 2012-02-05 13:10:44 +0100 | |
commit | 5cc1ce177fa52b7156dcf72176cb3be00108f58e (patch) | |
tree | 4fbf975258506657f2a559c2bc664ac18590b70d /pygithub3/core/result.py | |
parent | Complete skeleton of services glueing to requests (diff) | |
download | python-github3-5cc1ce177fa52b7156dcf72176cb3be00108f58e.tar.xz python-github3-5cc1ce177fa52b7156dcf72176cb3be00108f58e.zip |
User service complete
User.emails
User.keys
User.followers
Diffstat (limited to 'pygithub3/core/result.py')
-rw-r--r-- | pygithub3/core/result.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pygithub3/core/result.py b/pygithub3/core/result.py index f0b3016..5d8ea7a 100644 --- a/pygithub3/core/result.py +++ b/pygithub3/core/result.py @@ -16,7 +16,7 @@ class Method(object): def cached(func): def wrapper(self, page=1): - if self.cache.has_key(str(page)): + if str(page) in self.cache: return self.cache[str(page)] return func(self, page) return wrapper @@ -34,6 +34,7 @@ class Method(object): @if_needs_lastpage def __set_last_page_from(self, response): link_parsed = parse_link_value(response.headers['link']) + def get_last(url): url_rels = link_parsed[url] return (url_rels.get('rel') == 'last') @@ -57,6 +58,7 @@ class Method(object): self() return self.last_page + class Page(object): """ """ |