Skip to content
Snippets Groups Projects
Commit d0e723d4 authored by shinedday's avatar shinedday
Browse files

Django can now update

parent 0e1b7f73
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -140,7 +140,7 @@ class Ihm(MqttClient, SSHClient):
print("Hostname :", self.clients[i_client].hostname, " User :", self.clients[i_client].user)
self.run_cmd(i_client, commands)
self.update(self.experiment_name)
self.update(self.experiment_name, str(pathlib.Path().resolve()))
if cmd.lower() == "agent":
self.agent()
......
......@@ -46,7 +46,7 @@ class SSHClient:
print(e)
return ret
def update(self, experiment_name):
def update(self, experiment_name, path_to_experiment):
for client in self.clients:
transport = paramiko.Transport((client.hostname, 22))
transport.connect(username=client.user, password=client.password)
......@@ -54,7 +54,7 @@ class SSHClient:
sftp.mkdir("Desktop/mqtt_goyon/example/" + experiment_name, ignore_existing=True)
sftp.put_dir(
str(pathlib.Path().resolve()),
path_to_experiment,
"Desktop/mqtt_goyon/example/" + experiment_name
)
sftp.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment