sort keys so helper scripts can send blobs using send_request

This commit is contained in:
Victor Shyba 2021-05-20 18:03:23 -03:00
parent 51da0d0259
commit be8ecfa707

View file

@ -59,7 +59,7 @@ class StreamReflectorClient(asyncio.Protocol):
return return
async def send_request(self, request_dict: typing.Dict, timeout: int = 180): async def send_request(self, request_dict: typing.Dict, timeout: int = 180):
msg = json.dumps(request_dict) msg = json.dumps(request_dict, sort_keys=True)
try: try:
self.transport.write(msg.encode()) self.transport.write(msg.encode())
self.pending_request = self.loop.create_task(asyncio.wait_for(self.response_queue.get(), timeout)) self.pending_request = self.loop.create_task(asyncio.wait_for(self.response_queue.get(), timeout))