1
0
mirror of https://github.com/newnius/YAO-agent.git synced 2025-12-13 05:26:43 +00:00

all in one

This commit is contained in:
2019-12-26 19:08:02 +08:00
parent cd789c386a
commit 03aa692227

View File

@@ -147,7 +147,7 @@ class MyHandler(BaseHTTPRequestHandler):
client = docker.from_env()
container = client.containers.get('yao-agent-helper')
exit_code, output = container.exec_run('sh -c ' + '\'' + script + '\'')
exit_code, output = container.exec_run(['sh', '-c', '\'', script, '\''])
msg = {"code": 0, "id": output.decode('utf-8').rstrip('\n')}
print(msg)