Make use of str.removeprefix and .removesuffix (#85584)
This commit is contained in:
parent
d44210e573
commit
ae302bbec0
24 changed files with 33 additions and 52 deletions
|
@ -702,7 +702,7 @@ async def websocket_get_version(
|
|||
|
||||
for req in integration.requirements:
|
||||
if req.startswith("home-assistant-frontend=="):
|
||||
frontend = req.split("==", 1)[1]
|
||||
frontend = req.removeprefix("home-assistant-frontend==")
|
||||
|
||||
if frontend is None:
|
||||
connection.send_error(msg["id"], "unknown_version", "Version not found")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue