bpo-32410: Make SendfileNotAvailableError public#5243
Merged
asvetlov merged 3 commits intopython:masterfrom Jan 19, 2018
Merged
bpo-32410: Make SendfileNotAvailableError public#5243asvetlov merged 3 commits intopython:masterfrom
asvetlov merged 3 commits intopython:masterfrom
Conversation
1st1
reviewed
Jan 19, 2018
| offset, count) | ||
| else: | ||
| raise RuntimeError(exc.args[0]) from None | ||
| raise |
Member
There was a problem hiding this comment.
Can we reformat this code to:
except events.SendfileNotAvailable:
if not fallback:
raise
return await self._sock_sendfile_fallback(sock, file, offset, count)
1st1
reviewed
Jan 19, 2018
|
|
||
| Sendfile syscall is not available, subclass of :exc:`RuntimeError`. | ||
|
|
||
| Raised if Operation System does not support senfile syscall for |
1st1
reviewed
Jan 19, 2018
| -------------------- | ||
|
|
||
|
|
||
| .. exception:: SendfileNotAvailable |
Member
There was a problem hiding this comment.
One more nit: can we call it SendfileNotAvailableError? The Error suffix is used for 99% of exceptions in Python.
1st1
approved these changes
Jan 19, 2018
Member
|
@asvetlov - just curious, why did you skip-news for this new Exception introduction? |
Member
|
This is a follow-up PR; we already have a NEWS entry for loop.sock_sendfile. |
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.
https://bugs.python.org/issue32410