Improve string formatting v4 (#33668)

* Improve string formatting v4

* Use normal strings instead of f-strings

* Fix zeroconf test by adding back part of a condition
This commit is contained in:
springstan 2020-04-05 16:01:41 +02:00 committed by GitHub
parent b855177fe6
commit e3bcfb88e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 43 additions and 47 deletions

View file

@ -774,9 +774,9 @@ async def async_binding_operation(zha_gateway, source_ieee, target_ieee, operati
res = await asyncio.gather(*(t[0] for t in bind_tasks), return_exceptions=True)
for outcome, log_msg in zip(res, bind_tasks):
if isinstance(outcome, Exception):
fmt = log_msg[1] + " failed: %s"
fmt = f"{log_msg[1]} failed: %s"
else:
fmt = log_msg[1] + " completed: %s"
fmt = f"{log_msg[1]} completed: %s"
zdo.debug(fmt, *(log_msg[2] + (outcome,)))