From 926c01a97e9ca6c82e948d20cbc068f75591bc64 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 26 Apr 2015 20:11:49 +0300 Subject: [PATCH] Don't compare with limit if limit is None. Fixes #124. --- pylast/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylast/__init__.py b/pylast/__init__.py index fe6873e..51bb5a1 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -396,7 +396,7 @@ class _Network(object): seq = [] for node in doc.getElementsByTagName("tag"): - if len(seq) >= limit: + if limit and len(seq) >= limit: break tag = Tag(_extract(node, "name"), self) weight = _number(_extract(node, "count"))