Lazy evaluating for debug string command

This commit is contained in:
atse 2024-08-22 12:49:55 +08:00
parent 05d46030b4
commit 1db3a3ccb9

View File

@ -97,7 +97,7 @@ class Client:
line = await asyncio.shield(self._read_write(command)) line = await asyncio.shield(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