File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 5
5
6
6
setuptools .setup (
7
7
name = 'meshctrl' ,
8
- version = '0.1.7 ' ,
8
+ version = '0.1.8 ' ,
9
9
description = 'Python port of MeshCentral\' s Meshctrl.js program' ,
10
10
long_description = long_description ,
11
11
long_description_content_type = "text/markdown" ,
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ async def _websocket_call(self, data: dict) -> dict:
19
19
20
20
async with websockets .connect (uri ) as websocket :
21
21
22
- responseId = uuid .uuid4 ()
23
- data ["responseId " ] = responseId
22
+ response_id = str ( uuid .uuid4 () )
23
+ data ["responseid " ] = response_id
24
24
25
25
await websocket .send (
26
26
json .dumps (data )
@@ -29,14 +29,11 @@ async def _websocket_call(self, data: dict) -> dict:
29
29
async for message in websocket :
30
30
response = json .loads (message )
31
31
32
- if response ["responseId" ] == responseId :
32
+ if response ["responseId" ] == response_id :
33
33
return response
34
34
35
35
def _send (self , data ):
36
- loop = asyncio .get_event_loop ()
37
- result = loop .run_until_complete (self ._websocket_call (json .dumps (data )))
38
- loop .close ()
39
- return result
36
+ return asyncio .run (self ._websocket_call (data ))
40
37
41
38
# pulls a list of groups in MeshCentral
42
39
def get_mesh_groups (self ) -> dict :
You can’t perform that action at this time.
0 commit comments