Repository navigation
Fix logging error message #22276
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
Fix logging error message #22276
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,10 +191,11 @@ def _checkLevel(level): | |
| rv = level | ||
| elif str(level) == level: | ||
| if level not in _nameToLevel: | ||
| raise ValueError("Unknown level: %r" % level) | ||
| raise ValueError(f"Unknown level: {repr(level)}") | ||
| rv = _nameToLevel[level] | ||
| else: | ||
| raise TypeError("Level not an integer or a valid string: %r" % level) | ||
| raise TypeError("Level not an integer or a valid string: " | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could just be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went with |
||
| f"{repr(level)}") | ||
| return rv | ||
|
|
||
| #--------------------------------------------------------------------------- | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get to this code you would need to have passed the test
str(level) == level, how would a tuple do this? I wouldn't think this line needs changing.