1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use literal string interpolation in integrations X-Z (f-strings) (#26395)

This commit is contained in:
Franck Nijhof
2019-09-03 21:15:31 +02:00
committed by Pascal Vizeli
parent 445c741b30
commit dae6895a95
36 changed files with 115 additions and 137 deletions

View File

@@ -143,7 +143,7 @@ def _retrieve_list(host, token, **kwargs):
def _get_token(host, username, password):
"""Get authentication token for the given host+username+password."""
url = "http://{}/cgi-bin/luci/api/xqsystem/login".format(host)
url = f"http://{host}/cgi-bin/luci/api/xqsystem/login"
data = {"username": username, "password": password}
try:
res = requests.post(url, data=data, timeout=5)