From 56b63e7929bc9a2b74535107e7a9bb5f317bacc1 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 25 Apr 2013 10:46:24 +0200 Subject: mpclient: remove unused get_plist_song() Also drop now unused synchronous command functions. --- nephilim/mpdsocket.py | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'nephilim/mpdsocket.py') diff --git a/nephilim/mpdsocket.py b/nephilim/mpdsocket.py index 685b3d8..7a8f03d 100644 --- a/nephilim/mpdsocket.py +++ b/nephilim/mpdsocket.py @@ -126,37 +126,6 @@ class MPDSocket(QtCore.QObject): for arg in args[1:]: self._sock.write((' "%s" '%self._escape(unicode(arg))).encode('utf-8')) self._sock.write('\n') - def write_command_sync(self, *args): - """ - Send a command contained in args to MPD synchronously. An iterator over - response lines is returned. - """ - # XXX i don't really like this solution. can't it be done better? - self._logger.debug('Synchronously executing command:' + ' '.join(map(unicode, args))) - self._sock.blockSignals(True) - while not self._is_idle: - # finish all outstanding responses - if not self._sock.canReadLine(): - self._sock.waitForReadyRead() - self._handle_response() - - self._sock.write('noidle\n') - self._sock.waitForBytesWritten() - self._sock.waitForReadyRead() - self._parse_discard(self._read_response()) - - self._sock.write(args[0]) - for arg in args[1:]: - self._sock.write((' "%s" '%self._escape(unicode(arg))).encode('utf-8')) - self._sock.write('\n') - self._sock.waitForBytesWritten() - - while not self._sock.canReadLine(): - self._sock.waitForReadyRead() - for line in self._read_response(): - yield line - self._idle() - self._sock.blockSignals(False) def state(self): """ -- cgit v1.2.3