wrap 2 results in a list in cue and random plugin

This commit is contained in:
Johnny Robeson 2016-09-14 00:40:53 -04:00
parent 7c33d6858c
commit db782a2404
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ class CuePlugin(BeetsPlugin):
return
if len(cues) > 1:
self._log.info(u"Found multiple cue files doing nothing: {0}",
map(displayable_path, cues))
list(map(displayable_path, cues)))
cue_file = cues[0]
self._log.info("Found {} for {}", displayable_path(cue_file), item)

View file

@ -48,7 +48,7 @@ def random_item(lib, opts, args):
# Choose an artist and an object for that artist, removing
# this choice from the pool.
artist = random.choice(objs_by_artists.keys())
artist = random.choice(list(objs_by_artists.keys()))
objs_from_artist = objs_by_artists[artist]
i = random.randint(0, len(objs_from_artist) - 1)
objs.append(objs_from_artist.pop(i))