Fix: _collect_nodes() break if there are no child nodes

This commit is contained in:
Mice Pápai 2017-04-26 01:13:43 +02:00
parent b664509bd4
commit 7192a33207

View file

@ -4156,6 +4156,9 @@ def _collect_nodes(limit, sender, method_name, cacheable, params=None):
doc = sender._request(method_name, cacheable, params) doc = sender._request(method_name, cacheable, params)
doc = cleanup_nodes(doc) doc = cleanup_nodes(doc)
# break if there are no child nodes
if not doc.documentElement.childNodes:
break
main = doc.documentElement.childNodes[0] main = doc.documentElement.childNodes[0]
if main.hasAttribute("totalPages"): if main.hasAttribute("totalPages"):