[Pkg-mpd-commits] [python-mpd] 79/262: mpd.py: if command retval is None, don't require fetching

Simon McVittie smcv at debian.org
Sun May 22 18:16:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch upstream
in repository python-mpd.

commit 7299c4fd1a57ce290cbd4f9463deeebb02764e61
Author: J. Alexander Treuman <jat at spatialrift.net>
Date:   Mon Dec 13 19:47:23 2010 -0500

    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:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git



More information about the Pkg-mpd-commits mailing list