From b204743e1b1e320ad26d2ade21070e63020d9071 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Tue, 26 Oct 2010 22:30:01 -0400 Subject: [PATCH] Print iterations For now, print the number of iterations it takes to choose a song at random. --- libsaria/collection/lens.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsaria/collection/lens.py b/libsaria/collection/lens.py index e8977ccd..cd7fa6c0 100644 --- a/libsaria/collection/lens.py +++ b/libsaria/collection/lens.py @@ -115,7 +115,8 @@ class Playlist(collection.Collection): last.append((artist, title)) if len(last) > 15: last.pop(0) - print "Picking a song took %s iterations" % i + if i > 0: + print "Picking a song took %s iterations" % i return id return id