Skip to content

Commit 73a8de0

Browse files
authored
Fix error messages grammar (aio-libs#10798)
1 parent ceed502 commit 73a8de0

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ entertain early in the review process. Thank you in advance!
2424

2525
## Related issue number
2626

27-
<!-- Are there any issues opened that will be resolved by merging this change? -->
28-
<!-- Remember to prefix with 'Fixes' if it should close the issue (e.g. 'Fixes #123'). -->
27+
<!-- Will this resolve any open issues? -->
28+
<!-- Remember to prefix with 'Fixes' if it closes an issue (e.g. 'Fixes #123'). -->
2929

3030
## Checklist
3131

aiohttp/_http_parser.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,10 +506,10 @@ cdef class HttpParser:
506506
if self._payload is not None:
507507
if self._cparser.flags & cparser.F_CHUNKED:
508508
raise TransferEncodingError(
509-
"Not enough data for satisfy transfer length header.")
509+
"Not enough data to satisfy transfer length header.")
510510
elif self._cparser.flags & cparser.F_CONTENT_LENGTH:
511511
raise ContentLengthError(
512-
"Not enough data for satisfy content length header.")
512+
"Not enough data to satisfy content length header.")
513513
elif cparser.llhttp_get_errno(self._cparser) != cparser.HPE_OK:
514514
desc = cparser.llhttp_get_error_reason(self._cparser)
515515
raise PayloadEncodingError(desc.decode('latin-1'))

aiohttp/http_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class TransferEncodingError(PayloadEncodingError):
6969

7070

7171
class ContentLengthError(PayloadEncodingError):
72-
"""Not enough data for satisfy content length header."""
72+
"""Not enough data to satisfy content length header."""
7373

7474

7575
class LineTooLong(BadHttpMessage):

aiohttp/http_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,11 @@ def feed_eof(self) -> None:
792792
self.payload.feed_eof()
793793
elif self._type == ParseState.PARSE_LENGTH:
794794
raise ContentLengthError(
795-
"Not enough data for satisfy content length header."
795+
"Not enough data to satisfy content length header."
796796
)
797797
elif self._type == ParseState.PARSE_CHUNKED:
798798
raise TransferEncodingError(
799-
"Not enough data for satisfy transfer length header."
799+
"Not enough data to satisfy transfer length header."
800800
)
801801

802802
def feed_data(

0 commit comments

Comments
 (0)