-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 the string representation of ServerDisconnectedError
#4188
Conversation
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.
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.
|
Thanks! |
(cherry picked from commit a54956d) Co-authored-by: JenSte <[email protected]>
…) (#4208) (cherry picked from commit a54956d) Co-authored-by: JenSte <[email protected]>
What do these changes do?
These changes make sure that the string representation of
ServerDisconnectedError
is 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.txt
CHANGES
folder