[Pkg-mpd-commits] [python-mpd] 224/262: Fix behavior of noidle in the presence of pending changes

Simon McVittie smcv at debian.org
Sun May 22 18:16:50 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 453189aafaca76fa2a83da40d331e6559c0bd3ae
Author: Michael Helmling <michaelhelmling at posteo.de>
Date:   Sat Jan 25 20:12:44 2014 +0100

    Fix behavior of noidle in the presence of pending changes
    
    According to the protocol specification, the output of the "noidle"
    command is in principal the same as that of "idle", but might be empty.
    Without this patch, python-mpd2 raises a ProtocolError if the response
    to noidle is nonempty.
---
 mpd.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/mpd.py b/mpd.py
index 4c54cfe..43f3c5a 100644
--- a/mpd.py
+++ b/mpd.py
@@ -417,12 +417,7 @@ class MPDClient(object):
           raise CommandError('cannot send noidle if send_idle was not called')
         del self._pending[0]
         self._write_command("noidle")
-        status = self._read_list()
-        # In some case mpd has already write the changed line
-        if status is not None:
-            # So we need to fetch the result of the noidle
-            self._fetch_nothing()
-        return None
+        return self._fetch_list()
 
     def _hello(self):
         line = self._rfile.readline()

-- 
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