def send_response(self, response): """ Format a response from the MPD command handlers and send it to the client. """ if response: response = LINE_TERMINATOR.join(response) logger.debug(u'Response to [%s]:%s: %s', self.client_address, self.client_port, indent(response)) response = u'%s%s' % (response, LINE_TERMINATOR) data = response.encode(ENCODING) self.push(data)
def handle_response(self, response): """Handle response from the MPD frontend.""" self.send_response(LINE_TERMINATOR.join(response))