Only handle response in session if the response is not none

This commit is contained in:
Johannes Knutsen 2010-02-14 01:16:48 +01:00
parent f59a0a042d
commit 8c983f2014

View File

@ -48,7 +48,8 @@ class MpdSession(asynchat.async_chat):
def handle_request(self, input):
try:
response = self.handler.handle_request(input)
self.handle_response(response)
if response is not None:
self.handle_response(response)
except MpdAckError, e:
logger.warning(e)
return self.send_response(u'ACK %s' % e)