Skip to content

Commit 6fa9300

Browse files
committed
Fix response message format.
1 parent ac4b308 commit 6fa9300

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

myDevices/cloud/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,10 @@ def EnqueueCommandResponse(self, message, error):
509509
"""Send response after processing a command message"""
510510
debug('EnqueueCommandResponse error: {}'.format(error))
511511
if error:
512-
response = '{},error={}'.format(message['cmdId'], error)
512+
response = 'error,{}={}'.format(message['cmdId'], error)
513513
else:
514-
response = '{},ok'.format(message['cmdId'])
514+
response = 'ok,{}'.format(message['cmdId'])
515+
info(response)
515516
self.EnqueuePacket(response, cayennemqtt.COMMAND_RESPONSE_TOPIC)
516517

517518
def EnqueuePacket(self, message, topic=cayennemqtt.DATA_TOPIC):

0 commit comments

Comments
 (0)