Improve string formatting v3 (#33667)

* Improve string formatting v3

* Address review comment
This commit is contained in:
springstan 2020-04-05 01:32:58 +02:00 committed by GitHub
parent bf1b408038
commit c20a965eda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 32 additions and 37 deletions

View file

@ -285,7 +285,7 @@ class Hyperion(Light):
sock.close()
return False
sock.send(bytearray(json.dumps(request) + "\n", "utf-8"))
sock.send(bytearray(f"{json.dumps(request)}\n", "utf-8"))
try:
buf = sock.recv(4096)
except socket.timeout: