Constructor, not method call

This commit is contained in:
James Barnsley
2021-11-21 11:32:00 +13:00
parent 65ac8dfce3
commit c2f3154fa2

View File

@ -1195,13 +1195,8 @@ class IrisCore(pykka.ThreadingActor):
}
try:
http_client = AsyncHTTPClient()
response = await http_client.fetch(
url,
method="POST",
body=json.dumps(data)
validate_cert=self.config["iris"]["verify_certificates"]
)
http_client = AsyncHTTPClient(validate_cert=self.config["iris"]["verify_certificates"])
response = await http_client.fetch(url, method="POST", body=json.dumps(data))
except (urllib.error.HTTPError, urllib.error.URLError) as e:
error = json.loads(e.read())
logger.error("Could not update Snapcast meta")