File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11// See https://aka.ms/vscode-remote/devcontainer.json for format details.
22{
3- "name" : " PyDroid IPCam dev" ,
3+ "name" : " Connect-Box dev" ,
44 "context" : " .." ,
55 "dockerFile" : " Dockerfile" ,
66 "postCreateCommand" : " pip3 install -e ." ,
Original file line number Diff line number Diff line change 1616HTTP_HEADER_X_REQUESTED_WITH = "X-Requested-With"
1717
1818CMD_LOGIN = 15
19+ CMD_LOGOUT = 16
1920CMD_DEVICES = 123
2021
2122
@@ -76,6 +77,13 @@ async def async_get_devices(self) -> List[Device]:
7677
7778 return self .devices
7879
80+ async def async_logout (self ) -> None :
81+ """Logout and close session."""
82+ if not self .token :
83+ return
84+
85+ await self ._async_ws_function (CMD_LOGOUT )
86+
7987 async def async_initialize_token (self ) -> None :
8088 """Get the token first."""
8189 try :
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ async def main():
1515 await client .async_get_devices ()
1616 print (client .devices )
1717
18+ await client .async_logout ()
19+
1820
1921loop = asyncio .get_event_loop ()
2022loop .run_until_complete (main ())
You can’t perform that action at this time.
0 commit comments