@@ -58,13 +58,13 @@ async def socket_connected(
5858
5959 if self ._connect_uri :
6060 async with aiohttp .ClientSession () as session :
61- LOGGER .info (f "Posting message { http_body } to { self ._connect_uri } " )
61+ LOGGER .info ("Posting message %s to %s" , http_body , self ._connect_uri )
6262 async with session .post (self ._connect_uri , json = http_body ) as resp :
6363 response = await resp .text ()
6464 if resp .status != 200 :
65- LOGGER .error (f "Error posting message: { response } " )
65+ LOGGER .error ("Error posting message: %s" , response )
6666 else :
67- LOGGER .debug (f "Response: { response } " )
67+ LOGGER .debug ("Response: %s" , response )
6868
6969 async def inbound_socket_message (
7070 self ,
@@ -81,25 +81,25 @@ async def inbound_socket_message(
8181 }
8282
8383 async with aiohttp .ClientSession () as session :
84- LOGGER .info (f "Posting message { http_body } to { self ._message_uri } " )
84+ LOGGER .info ("Posting message %s to %s" , http_body , self ._message_uri )
8585 async with session .post (self ._message_uri , json = http_body ) as resp :
8686 response = await resp .text ()
8787 if resp .status != 200 :
88- LOGGER .error (f "Error posting message: { response } " )
88+ LOGGER .error ("Error posting message: %s" , response )
8989 else :
90- LOGGER .debug (f "Response: { response } " )
90+ LOGGER .debug ("Response: %s" , response )
9191
9292 async def socket_disconnected (self , connection_id : str ):
9393 """Handle socket disconnected."""
9494 async with aiohttp .ClientSession () as session :
9595 LOGGER .info (
96- f "Notifying of disconnect: { self ._disconnect_uri } { connection_id } "
96+ "Notifying of disconnect: %s %s" , self ._disconnect_uri , connection_id
9797 )
9898 async with session .post (
9999 self ._disconnect_uri , json = {"connection_id" : connection_id }
100100 ) as resp :
101101 response = await resp .text ()
102102 if resp .status != 200 :
103- LOGGER .error (f "Error posting to disconnect uri: { response } " )
103+ LOGGER .error ("Error posting to disconnect uri: %s" , response )
104104 else :
105- LOGGER .debug (f "Response: { response } " )
105+ LOGGER .debug ("Response: %s" , response )
0 commit comments