Allow reply_to to not be set in messages to the MPD frontend

This commit is contained in:
Stein Magnus Jodal 2010-10-31 01:04:37 +02:00
parent ac85936a9b
commit 66cc9d8c6f

View File

@ -42,7 +42,8 @@ class MpdFrontend(BaseFrontend):
u'Message recipient must be "frontend".'
if message['command'] == 'mpd_request':
response = self.dispatcher.handle_request(message['request'])
connection = unpickle_connection(message['reply_to'])
connection.send(response)
if 'reply_to' in message:
connection = unpickle_connection(message['reply_to'])
connection.send(response)
else:
pass # Ignore messages for other frontends