Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Justin
slapos.toolbox
Commits
fb80e410
Commit
fb80e410
authored
Dec 28, 2022
by
Justin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
promise/plugin: Fixed check_cpu_temperature.py to avoid errors when sensors not available
parent
4f1ebb44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
slapos/promise/plugin/check_cpu_temperature.py
slapos/promise/plugin/check_cpu_temperature.py
+3
-1
No files found.
slapos/promise/plugin/check_cpu_temperature.py
View file @
fb80e410
...
...
@@ -28,7 +28,9 @@ class RunPromise(JSONPromise):
try
:
cpu_temp
=
psutil
.
sensors_temperatures
()[
'coretemp'
][
0
][
1
]
except
(
KeyError
,
IndexError
)
as
e
:
self
.
logger
.
error
(
"Could not read core temperature"
)
# Put logger.info to avoid errors when sensors are not
# supported by OS (ex: VM)
self
.
logger
.
info
(
"Could not read core temperature on VM"
)
return
# Check spot temperature
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment