grpc: added args to execute script to reflect prior gui functionality, updated new and old gui to use the same exact logic for executing scripts for consistency
This commit is contained in:
parent
f98594e927
commit
9da64af79b
7 changed files with 30 additions and 22 deletions
|
@ -3,7 +3,6 @@ import logging
|
|||
import os
|
||||
import re
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
from concurrent import futures
|
||||
from pathlib import Path
|
||||
|
@ -1236,13 +1235,7 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
|
|||
def ExecuteScript(self, request, context):
|
||||
existing_sessions = set(self.coreemu.sessions.keys())
|
||||
file_path = Path(request.script)
|
||||
thread = threading.Thread(
|
||||
target=utils.execute_file,
|
||||
args=(file_path, {"coreemu": self.coreemu}),
|
||||
daemon=True,
|
||||
)
|
||||
thread.start()
|
||||
thread.join()
|
||||
utils.execute_script(self.coreemu, file_path, request.args)
|
||||
current_sessions = set(self.coreemu.sessions.keys())
|
||||
new_sessions = list(current_sessions.difference(existing_sessions))
|
||||
new_session = -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue