Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PDDF] Fix missing import on pddf_thermal.py #7851

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

seanwu-ec
Copy link
Contributor

@seanwu-ec seanwu-ec commented Jun 11, 2021

Signed-off-by: Sean Wu sean_wu@edge-core.com

Why I did it

To fix NameError exception while set_high_threshold() get invoked.

File "/usr/local/lib/python3.7/dist-packages/sonic_platform_pddf_base/pddf_thermal.py", line 97, in set_high_threshold
    os.system(cmd)
NameError: name 'os' is not defined

How I did it

import os

How to verify it

  1. The exception is gone.
  2. Use sensors command to confirm the threshold was changed after set_high_threshold().

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

Fix missing import on pddf_thermal.py

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Sean Wu <sean_wu@edge-core.com>
@seanwu-ec seanwu-ec requested a review from lguohan as a code owner June 11, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants