Skip to content

Commit a53d08e

Browse files
committed
fix endless loop bug in InoreaderClient.fetch_articles
1 parent 68dd1b3 commit a53d08e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inoreader/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ def fetch_articles(self, folder=None, tags=None, unread=True, starred=False, lim
195195
if limit and fetched_count >= limit:
196196
break
197197

198-
continuation = response.get('continuation') and (not limit or fetched_count < limit)
199-
while continuation:
198+
continuation = response.get('continuation')
199+
while continuation and (not limit or fetched_count < limit):
200200
params['c'] = continuation
201201
response = self.parse_response(
202202
self.session.post(url, params=params, proxies=self.proxies)
@@ -213,7 +213,7 @@ def fetch_articles(self, folder=None, tags=None, unread=True, starred=False, lim
213213
if limit and fetched_count >= limit:
214214
break
215215

216-
continuation = response.get('continuation') and (not limit or fetched_count < limit)
216+
continuation = response.get('continuation')
217217

218218
def fetch_unread(self, folder=None, tags=None, limit=None):
219219
for article in self.fetch_articles(folder=folder, tags=tags, unread=True):

0 commit comments

Comments
 (0)