>>> albums = lib.get_albums(limit=100)
>>> print albums[0]
LibraryItem(item=pylast.Album(u'Air', u'Talkie Walkie', (...) )
>>> albums = lib.get_albums(limit=None)
>>> print albums[0]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
pylast: r255
python: 2.6.6
Every function that uses _collect_nodes function with limit parameter set to
None has the same issue. When limit is set to None line 3526 is always False.
3526: if not node.nodeType == xml.dom.Node.TEXT_NODE and len(nodes) < limit:
Suggestion:
3526: if not node.nodeType == xml.dom.Node.TEXT_NODE and (not limit or
len(nodes) < limit):
Original issue reported on code.google.com by grzegorz...@gmail.com on 19 Mar 2011 at 7:32
Original issue reported on code.google.com by
grzegorz...@gmail.com
on 19 Mar 2011 at 7:32