Merge pull request #217 from pylast/fix-collect-nodes
Fix: _collect_nodes() break if there are no child nodes
This commit is contained in:
commit
d6281e3829
2 changed files with 4 additions and 2 deletions
|
@ -3945,6 +3945,9 @@ def _collect_nodes(limit, sender, method_name, cacheable, params=None):
|
|||
doc = sender._request(method_name, cacheable, params)
|
||||
doc = cleanup_nodes(doc)
|
||||
|
||||
# break if there are no child nodes
|
||||
if not doc.documentElement.childNodes:
|
||||
break
|
||||
main = doc.documentElement.childNodes[0]
|
||||
|
||||
if main.hasAttribute("totalPages"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue