String formatting improvements (#33653)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-04-04 21:39:22 +02:00
1 parent ed71683488
commit 886308a953
15 files changed
+21 -24

No files matched your search

+2 -2
View File
@@ -80,8 +80,8 @@ def setup(hass, config):
else:
uri_scheme = "http://"
event_collector = "{}{}:{}/services/collector/event".format(uri_scheme, host, port)
headers = {AUTHORIZATION: "Splunk {}".format(token)}
event_collector = f"{uri_scheme}{host}:{port}/services/collector/event"
headers = {AUTHORIZATION: f"Splunk {token}"}
def splunk_event_listener(event):
"""Listen for new messages on the bus and sends them to Splunk."""