Merge pull request #1785 from sampsyo/play-fix-cleanup

play: remove dead code, fix error catching
This commit is contained in:
Adrian Sampson 2015-12-31 14:38:04 -08:00
commit b0c94f4f47

View file

@ -129,13 +129,8 @@ class PlayPlugin(BeetsPlugin):
try:
util.interactive_open(open_args, command_str)
except OSError as exc:
raise ui.UserError("Could not play the music playlist: "
raise ui.UserError("Could not play the query: "
"{0}".format(exc))
finally:
if not raw:
self._log.debug('Removing temporary playlist: {}',
open_args[0])
util.remove(open_args[0])
def _create_tmp_playlist(self, paths_list):
"""Create a temporary .m3u file. Return the filename.