Print iterations

For now, print the number of iterations it takes to choose a song at
random.
This commit is contained in:
Bryan Schumaker 2010-10-26 22:30:01 -04:00
parent 5cf837aee2
commit b204743e1b
1 changed files with 2 additions and 1 deletions

View File

@ -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