From: J. Alexander Treuman Date: Tue, 14 Dec 2010 00:47:23 +0000 (-0500) Subject: mpd.py: if command retval is None, don't require fetching X-Git-Tag: v0.3.0~4 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=7299c4fd1a57ce290cbd4f9463deeebb02764e61;p=python-musicpd.git mpd.py: if command retval is None, don't require fetching --- 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: