From db782a2404fa8a6827c10a6536b4a960d19af135 Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Wed, 14 Sep 2016 00:40:53 -0400 Subject: [PATCH] wrap 2 results in a list in cue and random plugin --- beetsplug/cue.py | 2 +- beetsplug/random.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/cue.py b/beetsplug/cue.py index 63051bfc1..fd564b55c 100644 --- a/beetsplug/cue.py +++ b/beetsplug/cue.py @@ -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) diff --git a/beetsplug/random.py b/beetsplug/random.py index e1c6fea4a..a0719dcad 100644 --- a/beetsplug/random.py +++ b/beetsplug/random.py @@ -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))