Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tempus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
karaboDevices
tempus
Commits
92b39f39
Commit
92b39f39
authored
3 months ago
by
Andrea Parenti
Committed by
Jonathan Correa Magdalena
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix onInitialization
parent
872598de
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!2
Draft: Feat/p8003
,
!1
First version
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tempus/Tempus.py
+5
-0
5 additions, 0 deletions
src/tempus/Tempus.py
with
5 additions
and
0 deletions
src/tempus/Tempus.py
+
5
−
0
View file @
92b39f39
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
from
time
import
time
from
time
import
time
from
paramiko
import
AutoAddPolicy
from
paramiko.client
import
SSHClient
from
paramiko.client
import
SSHClient
from
psutil
import
net_io_counters
from
psutil
import
net_io_counters
...
@@ -401,6 +402,7 @@ class Tempus(Device):
...
@@ -401,6 +402,7 @@ class Tempus(Device):
async
def
onInitialization
(
self
):
async
def
onInitialization
(
self
):
try
:
try
:
self
.
client
=
SSHClient
()
self
.
client
=
SSHClient
()
self
.
client
.
set_missing_host_key_policy
(
AutoAddPolicy
())
self
.
client
.
load_system_host_keys
()
self
.
client
.
load_system_host_keys
()
self
.
client
.
connect
(
self
.
client
.
connect
(
self
.
controllerIp
,
username
=
"
root
"
,
password
=
""
)
self
.
controllerIp
,
username
=
"
root
"
,
password
=
""
)
...
@@ -418,6 +420,9 @@ class Tempus(Device):
...
@@ -418,6 +420,9 @@ class Tempus(Device):
await
self
.
send_command
(
await
self
.
send_command
(
"
mytpx4 = Timepix4control(1)
"
,
sleep_time
=
5
)
"
mytpx4 = Timepix4control(1)
"
,
sleep_time
=
5
)
self
.
status
=
f
"
Python environment started on
{
self
.
controllerIp
}
"
self
.
state
=
State
.
INIT
except
Exception
as
e
:
except
Exception
as
e
:
self
.
client
=
None
self
.
client
=
None
self
.
channel
=
None
self
.
channel
=
None
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment