@@ -35,7 +35,7 @@ def __init__(self) -> None:
35
35
else :
36
36
self .async_client = httpx .AsyncClient (base_url = self .base_url , timeout = Timeout (60.0 ))
37
37
38
- logging .info (f 'Loop interface initialized with base_url: { self . base_url } / user: { self .username } ' )
38
+ logging .info ('Loop interface initialized with base_url: %s / user: %s' , self .base_url , self . username )
39
39
40
40
def websocket_url (self ) -> str :
41
41
return f'ws{ "s" if "learning-loop.ai" in self .host else "" } ://' + self .host
@@ -48,7 +48,7 @@ async def ensure_login(self, relogin=False) -> None:
48
48
self .async_client .cookies .clear ()
49
49
response = await self .async_client .post ('/api/login' , data = {'username' : self .username , 'password' : self .password })
50
50
if response .status_code != 200 :
51
- logging .info (f 'Login failed with response: { response } ' )
51
+ logging .info ('Login failed with response: %s' , response )
52
52
raise LoopCommunicationException ('Login failed with response: ' + str (response ))
53
53
self .async_client .cookies .update (response .cookies )
54
54
@@ -57,7 +57,7 @@ async def logout(self) -> None:
57
57
58
58
response = await self .async_client .post ('/api/logout' )
59
59
if response .status_code != 200 :
60
- logging .info (f 'Logout failed with response: { response } ' )
60
+ logging .info ('Logout failed with response: %s' , response )
61
61
raise LoopCommunicationException ('Logout failed with response: ' + str (response ))
62
62
self .async_client .cookies .clear ()
63
63
0 commit comments