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

[thermalctld] Print exception using repr(e) to get more information for 201911 #109

Merged

Conversation

Junchao-Mellanox
Copy link
Collaborator

Merge #103 to 201911.

Why I did this?

The existing code print exception like:

self.log_error('Caught exception while initializing thermal manager - {}'.format(e))

And it would print empty string if the exception class doesn't implement str. And the empty string is useless for debugging.

How to fix it?

Always print the exception using repr(e), like:

self.log_error('Caught exception while initializing thermal manager - {}'.format(repr(e)))

…onic-net#103)

Allow exceptions to be printed even if they don't inherit from the `str` class
Conflicts:
	sonic-thermalctld/scripts/thermalctld
@liat-grozovik liat-grozovik merged commit e030133 into sonic-net:201911 Nov 3, 2020
@Junchao-Mellanox Junchao-Mellanox deleted the cherry-pick-61ed24e branch November 3, 2020 10:35
Junchao-Mellanox added a commit to Junchao-Mellanox/sonic-buildimage that referenced this pull request Nov 3, 2020
vdahiya12 pushed a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
Currently, we are building both Python 2 and Python 3 versions of sonic-platform-common. However, we are currently not creating a Python 3 version of sonic-config-engine, so the build breaks. As I intend to remove this dependency in the near future anyway, I am removing it.
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