Skip to content
Snippets Groups Projects
Commit 92b39f39 authored by Andrea Parenti's avatar Andrea Parenti Committed by Jonathan Correa Magdalena
Browse files

Fix onInitialization

parent 872598de
No related branches found
No related tags found
2 merge requests!2Draft: Feat/p8003,!1First version
......@@ -14,6 +14,7 @@
from time import time
from paramiko import AutoAddPolicy
from paramiko.client import SSHClient
from psutil import net_io_counters
......@@ -401,6 +402,7 @@ class Tempus(Device):
async def onInitialization(self):
try:
self.client = SSHClient()
self.client.set_missing_host_key_policy(AutoAddPolicy())
self.client.load_system_host_keys()
self.client.connect(
self.controllerIp, username="root", password="")
......@@ -418,6 +420,9 @@ class Tempus(Device):
await self.send_command(
"mytpx4 = Timepix4control(1)", sleep_time=5)
self.status = f"Python environment started on {self.controllerIp}"
self.state = State.INIT
except Exception as e:
self.client = None
self.channel = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment