aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/core/result.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-02-05 12:29:14 +0100
committerDavid Medina <davidmedina9@gmail.com>2012-02-05 12:29:14 +0100
commit7f2ce93f89785aaf0b4453653012e96e95ff940f (patch)
treefb2288714996deb1b7995ef022072a4581340759 /pygithub3/core/result.py
parentAdded asserts to "that never happens" (diff)
downloadpython-github3-7f2ce93f89785aaf0b4453653012e96e95ff940f.tar.xz
python-github3-7f2ce93f89785aaf0b4453653012e96e95ff940f.zip
Complete skeleton of services glueing to requests
Diffstat (limited to 'pygithub3/core/result.py')
-rw-r--r--pygithub3/core/result.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pygithub3/core/result.py b/pygithub3/core/result.py
index 1c8181e..f0b3016 100644
--- a/pygithub3/core/result.py
+++ b/pygithub3/core/result.py
@@ -23,7 +23,6 @@ class Method(object):
def if_needs_lastpage(func):
def wrapper(self, response):
- #import ipdb; ipdb.set_trace()
has_link = response.headers.get('link')
has_last_page = hasattr(self, 'last_page')
if not has_last_page and has_link:
@@ -34,7 +33,6 @@ class Method(object):
@if_needs_lastpage
def __set_last_page_from(self, response):
- #import ipdb; ipdb.set_trace()
link_parsed = parse_link_value(response.headers['link'])
def get_last(url):
url_rels = link_parsed[url]
@@ -165,7 +163,10 @@ class Result(object):
return Page(self.getter, page)
return None
- def all(self):
+ def iterator(self):
for page in self:
for resource in page:
yield resource
+
+ def all(self):
+ return list(self.iterator())