From f685a59e716eb6b888b418ad61c1df59af7b2e2c Mon Sep 17 00:00:00 2001 From: "nath@laptop" Date: Thu, 31 Dec 2015 13:40:48 +0100 Subject: [PATCH 1/2] play: remove dead code This piece of code won't ever execute because interactive open terminates python execution --- beetsplug/play.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/beetsplug/play.py b/beetsplug/play.py index 1d425e1c8..e366919fb 100644 --- a/beetsplug/play.py +++ b/beetsplug/play.py @@ -131,11 +131,6 @@ class PlayPlugin(BeetsPlugin): except OSError as exc: raise ui.UserError("Could not play the music playlist: " "{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. From 775ac4ed8368758c77e5cfebcec885cdda60f300 Mon Sep 17 00:00:00 2001 From: "nath@laptop" Date: Thu, 31 Dec 2015 21:49:03 +0100 Subject: [PATCH 2/2] play: Log exception from os call more accurately Depending on raw or not, we do not necessarily play a 'playlist'. Use 'query' generically instead. --- beetsplug/play.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/play.py b/beetsplug/play.py index e366919fb..c943a5155 100644 --- a/beetsplug/play.py +++ b/beetsplug/play.py @@ -129,7 +129,7 @@ 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)) def _create_tmp_playlist(self, paths_list):