X-Git-Url: http://git.kaliko.me/?p=python-musicpd.git;a=blobdiff_plain;f=mpd.py;h=7305f7d94eba202796d147894c9ecb671cc1381a;hp=05a78297d82a4d477d9ede7eea1d09b21d90f6a8;hb=7299c4fd1a57ce290cbd4f9463deeebb02764e61;hpb=fc0476b1fdf19914a4b74ba8312e3db95b60fd7f 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: