From 7299c4fd1a57ce290cbd4f9463deeebb02764e61 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Mon, 13 Dec 2010 19:47:23 -0500 Subject: [PATCH 1/1] mpd.py: if command retval is None, don't require fetching --- mpd.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mpd.py b/mpd.py index 05a7829..7305f7d 100644 --- a/mpd.py +++ b/mpd.py @@ -171,7 +171,9 @@ class MPDClient(object): raise CommandListError("Cannot use send_%s in a command list" % command.replace(" ", "_")) self._write_command(command, args) - self._pending.append(command) + retval = self._commands[command] + if retval is not None: + self._pending.append(command) def _fetch(self, command, args=None): if self._command_list is not None: @@ -189,6 +191,7 @@ class MPDClient(object): retval = self._commands[command] if callable(retval): return retval() + return retval def _execute(self, command, args): if self._iterating: -- 2.39.2