Fix the string representation of ServerDisconnectedError#4188
Merged
asvetlov merged 2 commits intoaio-libs:masterfrom Oct 17, 2019
Merged
Fix the string representation of ServerDisconnectedError#4188asvetlov merged 2 commits intoaio-libs:masterfrom
ServerDisconnectedError#4188asvetlov merged 2 commits intoaio-libs:masterfrom
Conversation
asvetlov
requested changes
Oct 16, 2019
Member
asvetlov
left a comment
There was a problem hiding this comment.
I believe providing 'Server disconnected' default value for message could be enough:
if message is None:
message = "Server disconnected"
__str__ is autogenerated from self.args[0].
790fcc0 to
55d24f6
Compare
55d24f6 to
5c60941
Compare
Codecov Report
@@ Coverage Diff @@
## master #4188 +/- ##
==========================================
- Coverage 97.57% 97.56% -0.02%
==========================================
Files 43 43
Lines 8825 8825
Branches 1381 1381
==========================================
- Hits 8611 8610 -1
- Misses 92 93 +1
Partials 122 122
Continue to review full report at Codecov.
|
asvetlov
approved these changes
Oct 17, 2019
Member
|
Thanks! |
asvetlov
pushed a commit
that referenced
this pull request
Oct 17, 2019
(cherry picked from commit a54956d) Co-authored-by: JenSte <[email protected]>
asvetlov
added a commit
that referenced
this pull request
Oct 17, 2019
…) (#4208) (cherry picked from commit a54956d) Co-authored-by: JenSte <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
These changes make sure that the string representation of
ServerDisconnectedErroris always a valid, human readable string.Are there changes in behavior for the user?
The user will never be surprised after calling
str()on an instance ofServerDisconnectedError.Related issue number
Fixes #4175.
Checklist
CONTRIBUTORS.txtCHANGESfolder