Lazy evaluating for debug string command

This commit is contained in:
atse 2024-08-22 12:49:55 +08:00
parent c0e4d49b7b
commit 920706fbab

View File

@ -70,7 +70,7 @@ class AsyncioClient:
line = await self._read_write(command) line = await self._read_write(command)
response = json.loads(line) response = json.loads(line)
logging.debug(f"{command}: {response}") logging.debug("%s: %s", command, response)
if "error" in response: if "error" in response:
raise CommandError(response["error"]) raise CommandError(response["error"])
return response return response