Skip to content

[psu] Fix incorrect file path for voltage, current and power.#6128

Merged
lguohan merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_psu_warning
Dec 4, 2020
Merged

[psu] Fix incorrect file path for voltage, current and power.#6128
lguohan merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_psu_warning

Conversation

@bingwang-ms
Copy link
Copy Markdown
Contributor

Signed-off-by: bingwang bingwang@microsoft.com

- Why I did it
Fixes #6126.
There is a bug in getting the path of voltage, current and power. The list object is directly converted to string to format the file path. As a result, read_txt_file will get None value and a WARNING will be recorded. This commit fix the issue.

- How I did it
Add a join to convert list to string.

- How to verify it
Verified on DX010, and no WARNING is seen after this update.

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

  • 201811
  • 201911
  • 202006

- Description for the changelog

Fix incorrect file path for voltage, current and power.

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

There is a bug in getting the path of voltage, current and power. The
list object is directly converted to string to format the file path. As
a result, read_txt_file will get None value and a WARNING will be
recorded. This commit fix the issue.

Signed-off-by: bingwang <bingwang@microsoft.com>
@bingwang-ms bingwang-ms requested a review from jleveque December 4, 2020 11:10
@lguohan lguohan merged commit 49804c6 into sonic-net:master Dec 4, 2020
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…sonic-net#6128)

Fixes sonic-net#6126.

There is a bug in getting the path of voltage, current and power. The
list object is directly converted to string to format the file path. As
a result, read_txt_file will get None value and a WARNING will be
recorded. This commit fix the issue.

Signed-off-by: bingwang <bingwang@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[psud] psud keeps reporting WARNING

3 participants